test_gradio / app.py
John Smith
Update app.py
bcaf4b9
raw
history blame
496 Bytes
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()