LuisV
commited on
Commit
·
7e219d2
1
Parent(s):
85953dc
Adding model to interface input
Browse files
app.py
CHANGED
@@ -73,21 +73,29 @@ with gr.Blocks() as demo:
|
|
73 |
</h2>
|
74 |
<p style="text-align: center;"></p>
|
75 |
""")
|
76 |
-
gr_image = gr.Image(
|
|
|
|
|
|
|
77 |
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
gr_emotion = gr.Textbox(
|
80 |
-
label="Evoked emotion: "
|
81 |
)
|
82 |
gr_colors = gr.Textbox(
|
83 |
-
label = "Main colors: "
|
84 |
)
|
85 |
gr_objects = gr.Textbox(
|
86 |
-
label = "Main objects present: "
|
87 |
)
|
88 |
|
89 |
gr_commentary = gr.Textbox(
|
90 |
-
label="Commentary on the artwork:",
|
91 |
)
|
92 |
|
93 |
|
@@ -95,7 +103,7 @@ with gr.Blocks() as demo:
|
|
95 |
btn = gr.Button(value="Submit your image!")
|
96 |
btn.click(
|
97 |
caption_artwork,
|
98 |
-
inputs=[gr_image],
|
99 |
outputs=[gr_emotion, gr_colors, gr_objects, gr_commentary]
|
100 |
)
|
101 |
|
|
|
73 |
</h2>
|
74 |
<p style="text-align: center;"></p>
|
75 |
""")
|
76 |
+
gr_image = gr.Image(
|
77 |
+
label= "An artwork: ",
|
78 |
+
value="./1665_Girl_with_a_Pearl_Earring.jpg"
|
79 |
+
)
|
80 |
|
81 |
+
gr_model = gr.Dropdown(
|
82 |
+
label= "A Large Language Model",
|
83 |
+
choices = AVAILABLE_LLMS,
|
84 |
+
value = AVAILABLE_LLMS[0]
|
85 |
+
)
|
86 |
|
87 |
gr_emotion = gr.Textbox(
|
88 |
+
label = "Evoked emotion: ",
|
89 |
)
|
90 |
gr_colors = gr.Textbox(
|
91 |
+
label = "Main colors: ",
|
92 |
)
|
93 |
gr_objects = gr.Textbox(
|
94 |
+
label = "Main objects present: ",
|
95 |
)
|
96 |
|
97 |
gr_commentary = gr.Textbox(
|
98 |
+
label = "Commentary on the artwork:",
|
99 |
)
|
100 |
|
101 |
|
|
|
103 |
btn = gr.Button(value="Submit your image!")
|
104 |
btn.click(
|
105 |
caption_artwork,
|
106 |
+
inputs=[gr_image, gr_model],
|
107 |
outputs=[gr_emotion, gr_colors, gr_objects, gr_commentary]
|
108 |
)
|
109 |
|