Spaces:
Runtime error
Runtime error
Update app.py
Browse files14 unmodified lines151617181920212223 unmodified lines46474847495051525352545556578 unmodified lines666768676970717214 unmodified linesResNet_model = load_model(ResNet_path)Efficient_model = load_model(EfficientNet_path)
history=[]def classify_selected_model(image, model_name): try: img = cv2.imread(image)23 unmodified lines history.append(f"Error: {str(e)}") return "Error", None, None return class_name, probability ,model_name return class_name, probability ,history
def export_results(class_name, probability, model_name): result_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}" history.append(result_str) result_label.value = result_str result_label.value = "\n".join(history)
8 unmodified lines outputs=[ gr.Label(value="Archaeological Site"), gr.Label(value="Probability"), gr.Label(value="Exported Result will be displayed here")], gr.Label(value="Exported Result")], examples=[ ["Sites/Ajloun.png"], ["Sites/Jeresh.png"],app.py+5-3