mo01018 commited on
Commit
a9f65b9
·
verified ·
1 Parent(s): 7dbb743

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
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
- log_entry = {
80
- "timestamp": datetime.datetime.utcnow().isoformat(),
81
- "user_input": user_input,
82
- "model": model_name,
83
- "predictions": predictions
84
- }
85
- with open(LOG_FILE, "a") as f:
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__)