Spaces:
Running
Running
Mrkomiljon
commited on
Update app.py
Browse filesupdated output path
app.py
CHANGED
@@ -65,13 +65,12 @@ def predict_audio(file_path):
|
|
65 |
|
66 |
class_name = id2label.get(predicted_label, "Unknown Class")
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
"Confidence": float(confidence)
|
72 |
-
}
|
73 |
except Exception as e:
|
74 |
-
|
|
|
75 |
|
76 |
# Gradio interfeysi
|
77 |
iface = gr.Interface(
|
|
|
65 |
|
66 |
class_name = id2label.get(predicted_label, "Unknown Class")
|
67 |
|
68 |
+
# Return alohida qiymatlar
|
69 |
+
return class_name, float(confidence)
|
70 |
+
|
|
|
|
|
71 |
except Exception as e:
|
72 |
+
# Xatolik bo'lsa
|
73 |
+
return "Error", str(e)
|
74 |
|
75 |
# Gradio interfeysi
|
76 |
iface = gr.Interface(
|