Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,8 +7,7 @@ tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
|
|
| 7 |
# Define the model names
|
| 8 |
model_names = {
|
| 9 |
"Flan-T5-small": "google/flan-t5-small",
|
| 10 |
-
"Flan-T5-base": "google/flan-t5-base"
|
| 11 |
-
"Flan-T5-large": "google/flan-t5-large"
|
| 12 |
}
|
| 13 |
|
| 14 |
# Pre-load the models
|
|
@@ -54,7 +53,7 @@ def respond(
|
|
| 54 |
demo = gr.ChatInterface(
|
| 55 |
respond,
|
| 56 |
additional_inputs=[
|
| 57 |
-
gr.Dropdown(choices=["Flan-T5-small", "Flan-T5-base"
|
| 58 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 59 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 60 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
|
|
|
| 7 |
# Define the model names
|
| 8 |
model_names = {
|
| 9 |
"Flan-T5-small": "google/flan-t5-small",
|
| 10 |
+
"Flan-T5-base": "google/flan-t5-base"
|
|
|
|
| 11 |
}
|
| 12 |
|
| 13 |
# Pre-load the models
|
|
|
|
| 53 |
demo = gr.ChatInterface(
|
| 54 |
respond,
|
| 55 |
additional_inputs=[
|
| 56 |
+
gr.Dropdown(choices=["Flan-T5-small", "Flan-T5-base"], value="Flan-T5-base", label="Model"),
|
| 57 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 58 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 59 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|