Spaces:
Runtime error
Runtime error
Update app.py
Browse files41 unmodified lines42434445454647482 unmodified lines5152535454555657585960616162636441 unmodified lines
def export_results(): # In this example, you can use the values from the current state of widgets class_name, probability = classify_selected_model(image_input.value, model_dropdown.value) model_name = model_dropdown.value result_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}"2 unmodified lines
image_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Label(value="Exported Result will be displayed here") iface = gr.Interface( fn=classify_selected_model, inputs=[image_input, model_dropdown], outputs=[ gr.Label(value="Archaeological Site"), gr.Label(value="Probability"), result_label], gr.Label(value="Exported Result will be displayed here")], examples=[ ["Sites/Ajloun.png"], ["Sites/Jeresh.png"],app.py+3-3