kajila commited on
Commit
8ff6059
·
verified ·
1 Parent(s): b6e7131

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -121,19 +121,18 @@ repo_id="RAGREPORTS-log",
121
  )
122
 
123
  with scheduler.lock:
124
- with log_file.open("a") as f:
125
- # Indent the code inside the 'with' block
126
- f.write(json.dumps(
127
- {
128
- 'user_input': user_input,
129
- 'retrieved_context': context_for_query,
130
- 'model_response': prediction
131
- }
132
- ))
133
- f.write("\n")
134
-
135
- # Return the prediction after logging
136
- return prediction
137
  def get_predict(question, company):
138
  # Map user selection to company name
139
  company_map = {
 
121
  )
122
 
123
  with scheduler.lock:
124
+ with log_file.open("a") as f:
125
+ f.write(json.dumps(
126
+ {
127
+ 'user_input': user_input,
128
+ 'retrieved_context': context_for_query,
129
+ 'model_response': prediction
130
+ }
131
+ ))
132
+ f.write("\n")
133
+
134
+ # Return the prediction after logging
135
+ return prediction
 
136
  def get_predict(question, company):
137
  # Map user selection to company name
138
  company_map = {