Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def predict_image(img):
|
|
59 |
best_conf = top3_probs[0].item() * 100
|
60 |
|
61 |
# 保存结果
|
62 |
-
with open('prediction_results.txt', 'a') as f:
|
63 |
f.write(f"Image: {img}\n"
|
64 |
f"Predicted: {best_class}\n"
|
65 |
f"Confidence: {best_conf:.2f}%\n"
|
|
|
59 |
best_conf = top3_probs[0].item() * 100
|
60 |
|
61 |
# 保存结果
|
62 |
+
with open('/tmp/prediction_results.txt', 'a') as f:
|
63 |
f.write(f"Image: {img}\n"
|
64 |
f"Predicted: {best_class}\n"
|
65 |
f"Confidence: {best_conf:.2f}%\n"
|