Ubaidbhat commited on
Commit
716f2b7
1 Parent(s): 3a70b69

storage structure changed

Browse files
Files changed (2) hide show
  1. Tom -img1.jpeg-tracking.json +0 -0
  2. app.py +4 -4
Tom -img1.jpeg-tracking.json ADDED
File without changes
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"/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,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"/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")
 
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/images/{new_image_name}"
206
  input_filename = f"{user_name}-{image_name}-conversation-memory.txt"
207
+ input_filepath = f"/data/conversations/{input_filename}"
208
+ count_file_path = f"/data/conversations/{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/conversations/{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")