Spaces:
Runtime error
Runtime error
pharmapsychotic
commited on
Commit
•
e4cca8e
1
Parent(s):
43bc55e
Set api_name on buttons so other spaces can call into the correct function by name
Browse files
app.py
CHANGED
@@ -176,7 +176,7 @@ def analyze_tab():
|
|
176 |
movement = gr.Label(label="Movement", num_top_classes=5)
|
177 |
trending = gr.Label(label="Trending", num_top_classes=5)
|
178 |
flavor = gr.Label(label="Flavor", num_top_classes=5)
|
179 |
-
button = gr.Button("Analyze")
|
180 |
button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])
|
181 |
|
182 |
with gr.Blocks(css=CSS) as block:
|
@@ -189,7 +189,7 @@ with gr.Blocks(css=CSS) as block:
|
|
189 |
with gr.Column():
|
190 |
input_model = gr.Dropdown(MODELS, value=MODELS[0], label='CLIP Model')
|
191 |
input_mode = gr.Radio(['best', 'fast', 'classic', 'negative'], value='best', label='Mode')
|
192 |
-
submit_btn = gr.Button("Submit")
|
193 |
output_text = gr.Textbox(label="Output", elem_id="output-txt")
|
194 |
|
195 |
with gr.Group(elem_id="share-btn-container"):
|
|
|
176 |
movement = gr.Label(label="Movement", num_top_classes=5)
|
177 |
trending = gr.Label(label="Trending", num_top_classes=5)
|
178 |
flavor = gr.Label(label="Flavor", num_top_classes=5)
|
179 |
+
button = gr.Button("Analyze", api_name="image-analysis")
|
180 |
button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])
|
181 |
|
182 |
with gr.Blocks(css=CSS) as block:
|
|
|
189 |
with gr.Column():
|
190 |
input_model = gr.Dropdown(MODELS, value=MODELS[0], label='CLIP Model')
|
191 |
input_mode = gr.Radio(['best', 'fast', 'classic', 'negative'], value='best', label='Mode')
|
192 |
+
submit_btn = gr.Button("Submit", api_name="image-to-prompt")
|
193 |
output_text = gr.Textbox(label="Output", elem_id="output-txt")
|
194 |
|
195 |
with gr.Group(elem_id="share-btn-container"):
|