bubuuunel commited on
Commit
89551c9
1 Parent(s): d039dd5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -125,18 +125,18 @@ print (answer)
125
  # While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
126
  # access
127
 
128
- with scheduler.lock:
129
- with log_file.open("a") as f:
130
- f.write(json.dumps(
131
- {
132
- 'user_input': user_input,
133
- 'retrieved_context': context_for_query,
134
- 'model_response': prediction
135
- }
136
- ))
137
- f.write("\n")
138
-
139
- return prediction
140
 
141
  # Set-up the Gradio UI
142
  # Add text box and radio button to the interface
 
125
  # While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
126
  # access
127
 
128
+ with scheduler.lock:
129
+ with log_file.open("a") as f:
130
+ f.write(json.dumps(
131
+ {
132
+ 'user_input': user_input,
133
+ 'retrieved_context': context_for_query,
134
+ 'model_response': prediction
135
+ }
136
+ ))
137
+ f.write("\n")
138
+
139
+ return prediction
140
 
141
  # Set-up the Gradio UI
142
  # Add text box and radio button to the interface