Spaces:
Runtime error
Runtime error
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() | |