Spaces:
Runtime error
Runtime error
Update app.py
Browse files41 unmodified lines424344454647482 unmodified lines515253545556575859606162636441 unmodified linesdef export_results():# In this example, you can use the values from the current state of widgetsclass_name, probability = classify_selected_model(image_input.value, model_dropdown.value)model_name = model_dropdown.valueresult_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}"2 unmodified linesimage_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],examples=[["Sites/Ajloun.png"],["Sites/Jeresh.png"],41 unmodified lines424344454647482 unmodified lines515253545556575859606162636441 unmodified linesdef export_results():class_name, probability = classify_selected_model(image_input.value, model_dropdown.value)model_name = model_dropdown.valueresult_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}"2 unmodified linesimage_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")iface = gr.Interface(fn=classify_selected_model,inputs=[image_input, model_dropdown],outputs=[gr.Label(value="Archaeological Site"),gr.Label(value="Probability"),gr.Label(value="Exported Result will be displayed here")],examples=[["Sites/Ajloun.png"],["Sites/Jeresh.png"],
app.py+3-3