Ubaidbhat commited on
Commit
3a70b69
·
verified ·
1 Parent(s): 393c365

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -202,10 +202,10 @@ def pred(user_name, image_path, audio, user_input):
202
  if image_path:
203
  image_name = image_path.split("/")[-1]
204
  new_image_name = f"{user_name}-{image_name}"
205
- new_image_path = f"./{new_image_name}"
206
  input_filename = f"{user_name}-{image_name}-conversation-memory.txt"
207
- input_filepath = f"./{input_filename}"
208
- count_file_path = f"{user_name}-{image_name}-tracking.json"
209
 
210
  if not os.path.exists(new_image_path):
211
  shutil.copy(image_path, new_image_path)
@@ -266,7 +266,7 @@ def pred(user_name, image_path, audio, user_input):
266
  def clear_inputs(user_name, image_path):
267
  image_name = image_path.split("/")[-1]
268
  input_filename = f"{user_name}-{image_name}-conversation-memory.txt"
269
- input_filepath = f"./{input_filename}"
270
  if os.path.exists(input_filepath):
271
  with open(input_filepath, 'a') as f:
272
  f.write("\n" + "Old Person: " + "new photo uploaded")
 
202
  if image_path:
203
  image_name = image_path.split("/")[-1]
204
  new_image_name = f"{user_name}-{image_name}"
205
+ new_image_path = f"/data/{new_image_name}"
206
  input_filename = f"{user_name}-{image_name}-conversation-memory.txt"
207
+ input_filepath = f"/data/{input_filename}"
208
+ count_file_path = f"/data/{user_name}-{image_name}-tracking.json"
209
 
210
  if not os.path.exists(new_image_path):
211
  shutil.copy(image_path, new_image_path)
 
266
  def clear_inputs(user_name, image_path):
267
  image_name = image_path.split("/")[-1]
268
  input_filename = f"{user_name}-{image_name}-conversation-memory.txt"
269
+ input_filepath = f"/data/{input_filename}"
270
  if os.path.exists(input_filepath):
271
  with open(input_filepath, 'a') as f:
272
  f.write("\n" + "Old Person: " + "new photo uploaded")