Rulga commited on
Commit
6f3f7b2
·
1 Parent(s): 3595c1e

Refactor conversation deletion logic: Simplify annotation file path handling by reducing the number of paths considered for deletion.

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -856,13 +856,7 @@ def delete_conversation_from_huggingface(conversation_id):
856
  # Учитываем разные варианты пути к аннотациям
857
  annotations_base = os.path.basename(DATASET_ANNOTATIONS_PATH)
858
  annotation_paths = [
859
- f"{annotations_base}/annotation_{conversation_id}.json",
860
- f"{annotations_base}/evaluation_{conversation_id}.json",
861
- f"annotations/annotation_{conversation_id}.json",
862
- f"annotations/evaluation_{conversation_id}.json",
863
- f"evaluations/annotation_{conversation_id}.json",
864
- f"evaluations/evaluation_{conversation_id}.json",
865
- f"{chat_dir}/evaluations/evaluation_{conversation_id}.json"
866
  ]
867
 
868
  for annotation_path in annotation_paths:
 
856
  # Учитываем разные варианты пути к аннотациям
857
  annotations_base = os.path.basename(DATASET_ANNOTATIONS_PATH)
858
  annotation_paths = [
859
+ f"{annotations_base}/annotation_{conversation_id}.json"
 
 
 
 
 
 
860
  ]
861
 
862
  for annotation_path in annotation_paths: