Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -87,15 +87,16 @@ with gr.Blocks(fill_height=False) as demo:
|
|
87 |
submit_btn = gr.Button("Submit")
|
88 |
output = gr.Textbox(label="Output")
|
89 |
|
90 |
-
|
|
|
91 |
|
92 |
with gr.Accordion(label="Advanced Generation Parameters", open=False):
|
93 |
examples=[
|
94 |
-
["example_images/rococo.jpg", "What art era is this?", "", "
|
95 |
-
["example_images/examples_wat_arun.jpg", "Give me travel tips for the area around this monument.", "", "
|
96 |
-
["example_images/examples_invoice.png", "What is the due date and the invoice date?", "", "
|
97 |
-
["example_images/s2w_example.png", "What is this UI about?", "", "
|
98 |
-
["example_images/examples_weather_events.png", "Where do the severe droughts happen according to this diagram?", "", "
|
99 |
]
|
100 |
# Hyper-parameters for generation
|
101 |
max_new_tokens = gr.Slider(
|
@@ -135,10 +136,11 @@ with gr.Blocks(fill_height=False) as demo:
|
|
135 |
)
|
136 |
decoding_strategy = gr.Radio(
|
137 |
[
|
138 |
-
"Greedy",
|
139 |
"Top P Sampling",
|
|
|
|
|
140 |
],
|
141 |
-
value="
|
142 |
label="Decoding strategy",
|
143 |
interactive=True,
|
144 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|
|
|
87 |
submit_btn = gr.Button("Submit")
|
88 |
output = gr.Textbox(label="Output")
|
89 |
|
90 |
+
temperature, max_new_tokens,
|
91 |
+
repetition_penalty, top_p
|
92 |
|
93 |
with gr.Accordion(label="Advanced Generation Parameters", open=False):
|
94 |
examples=[
|
95 |
+
["example_images/rococo.jpg", "What art era is this?", "", "TopP Sampling", 0.4, 512, 1.2, 0.8],
|
96 |
+
["example_images/examples_wat_arun.jpg", "Give me travel tips for the area around this monument.", "", "Top P Sampling", 0.4, 512, 1.2, 0.8],
|
97 |
+
["example_images/examples_invoice.png", "What is the due date and the invoice date?", "", "Top P Sampling", 0.4, 512, 1.2, 0.8],
|
98 |
+
["example_images/s2w_example.png", "What is this UI about?", "", "Top P Sampling", 0.4, 512, 1.2, 0.8],
|
99 |
+
["example_images/examples_weather_events.png", "Where do the severe droughts happen according to this diagram?", "", "Top P Sampling", 0.4, 512, 1.2, 0.8],
|
100 |
]
|
101 |
# Hyper-parameters for generation
|
102 |
max_new_tokens = gr.Slider(
|
|
|
136 |
)
|
137 |
decoding_strategy = gr.Radio(
|
138 |
[
|
|
|
139 |
"Top P Sampling",
|
140 |
+
"Greedy",
|
141 |
+
|
142 |
],
|
143 |
+
value="Top P Sampling",
|
144 |
label="Decoding strategy",
|
145 |
interactive=True,
|
146 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|