Spaces:
Runtime error
Runtime error
nicole-ait
commited on
Commit
•
80df763
1
Parent(s):
5639a50
lamini models
Browse files
app.py
CHANGED
@@ -7,12 +7,14 @@ template_by_step = """Question: {question}
|
|
7 |
|
8 |
Answer: Let's think step by step."""
|
9 |
|
|
|
|
|
10 |
|
11 |
def run(
|
12 |
question: gr.Textbox = None,
|
13 |
-
repo_id: gr.Dropdown =
|
14 |
temperature: gr.Slider = 0.5,
|
15 |
-
max_length: gr.Slider =
|
16 |
by_steq: gr.Checkbox = False,
|
17 |
):
|
18 |
template = template_by_step if by_steq else "{question}"
|
@@ -27,11 +29,10 @@ def run(
|
|
27 |
return result
|
28 |
|
29 |
|
30 |
-
models = ["MBZUAI/LaMini-Flan-T5-248M", "MBZUAI/LaMini-Flan-T5-783M"]
|
31 |
inputs = [
|
32 |
gr.Textbox(label="Question", lines=3),
|
33 |
gr.Dropdown(choices=models,
|
34 |
-
value=models[0]
|
35 |
gr.Slider(0.0, 1.0, value=0.5, step=0.05, label="Temperature"),
|
36 |
gr.Slider(64, 1024, value=512, label="Max Length"),
|
37 |
gr.Checkbox(label="Think step by step", value=False),
|
|
|
7 |
|
8 |
Answer: Let's think step by step."""
|
9 |
|
10 |
+
models = ["MBZUAI/LaMini-Flan-T5-248M", "MBZUAI/LaMini-Flan-T5-783M"]
|
11 |
+
|
12 |
|
13 |
def run(
|
14 |
question: gr.Textbox = None,
|
15 |
+
repo_id: gr.Dropdown = models[0],
|
16 |
temperature: gr.Slider = 0.5,
|
17 |
+
max_length: gr.Slider = 512,
|
18 |
by_steq: gr.Checkbox = False,
|
19 |
):
|
20 |
template = template_by_step if by_steq else "{question}"
|
|
|
29 |
return result
|
30 |
|
31 |
|
|
|
32 |
inputs = [
|
33 |
gr.Textbox(label="Question", lines=3),
|
34 |
gr.Dropdown(choices=models,
|
35 |
+
value=models[0], label="Model", allow_custom_value=True),
|
36 |
gr.Slider(0.0, 1.0, value=0.5, step=0.05, label="Temperature"),
|
37 |
gr.Slider(64, 1024, value=512, label="Max Length"),
|
38 |
gr.Checkbox(label="Think step by step", value=False),
|