Update app.py
Browse files
app.py
CHANGED
@@ -69,12 +69,13 @@ with gr.Blocks() as demo:
|
|
69 |
max_tokens_input = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
|
70 |
temperature_input = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
|
71 |
top_p_input = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
|
72 |
-
|
|
|
73 |
with gr.Column():
|
74 |
response_output = gr.Textbox(label="Response", lines=4, interactive=False)
|
75 |
|
76 |
-
#
|
77 |
-
|
78 |
chat_or_image,
|
79 |
inputs=[
|
80 |
image_input,
|
|
|
69 |
max_tokens_input = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
|
70 |
temperature_input = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
|
71 |
top_p_input = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
|
72 |
+
submit_button = gr.Button("Submit")
|
73 |
+
|
74 |
with gr.Column():
|
75 |
response_output = gr.Textbox(label="Response", lines=4, interactive=False)
|
76 |
|
77 |
+
# Handle button click to trigger the callback
|
78 |
+
submit_button.click(
|
79 |
chat_or_image,
|
80 |
inputs=[
|
81 |
image_input,
|