Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,21 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# Load the BLOOM model
|
4 |
+
model = gr.load("models/CreitinGameplays/bloom-3b-conversational")
|
5 |
+
|
6 |
+
# Define the interface with max_length limit
|
7 |
+
interface = gr.Interface(
|
8 |
+
fn=model,
|
9 |
+
inputs="text",
|
10 |
+
outputs="text",
|
11 |
+
max_length=250, # Limit input text length to 250 characters
|
12 |
+
css="""
|
13 |
+
.gr-form textarea {
|
14 |
+
height: 100px; /* Adjust height as needed */
|
15 |
+
}
|
16 |
+
""", # Optional: Adjust input text area height
|
17 |
+
description="Interact with BLOOM (limited to 250 characters)",
|
18 |
+
)
|
19 |
+
|
20 |
+
# Launch the Gradio interface
|
21 |
+
interface.launch()
|