Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ def store_response():
|
|
41 |
log_entry = f"[{timestamp}] City: {city} | GPT Response: {response}\n"
|
42 |
print(log_entry)
|
43 |
|
44 |
-
#
|
45 |
-
with open("gpt_responses.log", "a") as f:
|
46 |
f.write(log_entry)
|
47 |
|
48 |
return jsonify({"status": "received", "message": "GPT response logged"}), 200
|
|
|
41 |
log_entry = f"[{timestamp}] City: {city} | GPT Response: {response}\n"
|
42 |
print(log_entry)
|
43 |
|
44 |
+
# ✅ Use temporary folder that HF Spaces allow
|
45 |
+
with open("/tmp/gpt_responses.log", "a") as f:
|
46 |
f.write(log_entry)
|
47 |
|
48 |
return jsonify({"status": "received", "message": "GPT response logged"}), 200
|