Spaces:
Running on Zero
Running on Zero
Commit ·
e4cca8e
1
Parent(s): 43bc55e
Set api_name on buttons so other spaces can call into the correct function by name
Browse files175 unmodified lines1761771781791801811826 unmodified lines189190191192193194195175 unmodified linesmovement = gr.Label(label="Movement", num_top_classes=5)trending = gr.Label(label="Trending", num_top_classes=5)flavor = gr.Label(label="Flavor", num_top_classes=5)button = gr.Button("Analyze")button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])with gr.Blocks(css=CSS) as block:6 unmodified lineswith gr.Column():input_model = gr.Dropdown(MODELS, value=MODELS[0], label='CLIP Model')input_mode = gr.Radio(['best', 'fast', 'classic', 'negative'], value='best', label='Mode')submit_btn = gr.Button("Submit")output_text = gr.Textbox(label="Output", elem_id="output-txt")with gr.Group(elem_id="share-btn-container"):175 unmodified lines1761771781791801811826 unmodified lines189190191192193194195175 unmodified linesmovement = gr.Label(label="Movement", num_top_classes=5)trending = gr.Label(label="Trending", num_top_classes=5)flavor = gr.Label(label="Flavor", num_top_classes=5)button = gr.Button("Analyze", api_name="image-analysis")button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])with gr.Blocks(css=CSS) as block:6 unmodified lineswith gr.Column():input_model = gr.Dropdown(MODELS, value=MODELS[0], label='CLIP Model')input_mode = gr.Radio(['best', 'fast', 'classic', 'negative'], value='best', label='Mode')submit_btn = gr.Button("Submit", api_name="image-to-prompt")output_text = gr.Textbox(label="Output", elem_id="output-txt")with gr.Group(elem_id="share-btn-container"):
app.py+2-2