Spaces:
Runtime error
Runtime error
Update prompt
Browse filesUpdate prompt_textbox placeholder and default value, increase maximum value for min_len slider, change default value for sampling radio button, and update default value for top_p slider.
app.py
CHANGED
@@ -60,15 +60,15 @@ with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
|
|
60 |
with gr.Row():
|
61 |
with gr.Column(scale=3):
|
62 |
image_input = gr.Image(type="pil")
|
63 |
-
prompt_textbox = gr.Textbox(label="Prompt:", placeholder="prompt", lines=2)
|
64 |
output = gr.Textbox(label="Output")
|
65 |
submit = gr.Button("Run", variant="primary")
|
66 |
|
67 |
with gr.Column(scale=1):
|
68 |
min_len = gr.Slider(
|
69 |
minimum=1,
|
70 |
-
maximum=
|
71 |
-
value=
|
72 |
step=1,
|
73 |
interactive=True,
|
74 |
label="Min Length",
|
@@ -85,7 +85,7 @@ with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
|
|
85 |
|
86 |
sampling = gr.Radio(
|
87 |
choices=["Beam search", "Nucleus sampling"],
|
88 |
-
value="
|
89 |
label="Text Decoding Method",
|
90 |
interactive=True,
|
91 |
)
|
@@ -93,7 +93,7 @@ with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
|
|
93 |
top_p = gr.Slider(
|
94 |
minimum=0.5,
|
95 |
maximum=1.0,
|
96 |
-
value=0.
|
97 |
step=0.1,
|
98 |
interactive=True,
|
99 |
label="Top p",
|
|
|
60 |
with gr.Row():
|
61 |
with gr.Column(scale=3):
|
62 |
image_input = gr.Image(type="pil")
|
63 |
+
prompt_textbox = gr.Textbox(label="Prompt:", placeholder="prompt", value="Please describe this image.", lines=2)
|
64 |
output = gr.Textbox(label="Output")
|
65 |
submit = gr.Button("Run", variant="primary")
|
66 |
|
67 |
with gr.Column(scale=1):
|
68 |
min_len = gr.Slider(
|
69 |
minimum=1,
|
70 |
+
maximum=100,
|
71 |
+
value=100,
|
72 |
step=1,
|
73 |
interactive=True,
|
74 |
label="Min Length",
|
|
|
85 |
|
86 |
sampling = gr.Radio(
|
87 |
choices=["Beam search", "Nucleus sampling"],
|
88 |
+
value="Nucleus sampling",
|
89 |
label="Text Decoding Method",
|
90 |
interactive=True,
|
91 |
)
|
|
|
93 |
top_p = gr.Slider(
|
94 |
minimum=0.5,
|
95 |
maximum=1.0,
|
96 |
+
value=0.2,
|
97 |
step=0.1,
|
98 |
interactive=True,
|
99 |
label="Top p",
|