Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,14 +76,13 @@ def requestResults(text, pipeline):
|
|
| 76 |
LOG_FILE = "usage_log.jsonl" # Each line is a JSON object
|
| 77 |
|
| 78 |
def log_interaction(user_input, model_name, predictions):
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
f.write(json.dumps(log_entry) + "\n")
|
| 87 |
|
| 88 |
|
| 89 |
app = Flask(__name__)
|
|
|
|
| 76 |
LOG_FILE = "usage_log.jsonl" # Each line is a JSON object
|
| 77 |
|
| 78 |
def log_interaction(user_input, model_name, predictions):
|
| 79 |
+
print("====== Interaction Log ======")
|
| 80 |
+
print("Timestamp:", datetime.datetime.utcnow().isoformat())
|
| 81 |
+
print("Model:", model_name)
|
| 82 |
+
print("Input:", user_input)
|
| 83 |
+
print("Predictions:", predictions)
|
| 84 |
+
print("=============================")
|
| 85 |
+
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
app = Flask(__name__)
|