Spaces:
Runtime error
Runtime error
File size: 496 Bytes
a4fcc7e bcaf4b9 e77f816 bcaf4b9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
# Define your model prediction function
def predict(selected_option):
# Implement your model prediction logic here based on the selected_option
result = f"You selected: {selected_option}"
return result
# Create a Dropdown input component
input_dropdown = gr.inputs.Dropdown(choices=["Option 1", "Option 2", "Option 3"])
# Create the Gradio interface
iface = gr.Interface(fn=predict, inputs=input_dropdown, outputs="text")
# Launch the interface
iface.launch()
|