mashaelalbu commited on
Commit
c4d7fee
·
verified ·
1 Parent(s): 4866316

Update app/routes.py

Browse files
Files changed (1) hide show
  1. app/routes.py +1 -11
app/routes.py CHANGED
@@ -66,15 +66,6 @@ def process_image():
66
  "supported_formats": list(ALLOWED_EXTENSIONS)
67
  }), 400
68
 
69
- # الحصول على قائمة الحساسيات من المستخدم أو استخدام القائمة الثابتة
70
- user_allergens = request.form.get('allergens')
71
- if user_allergens:
72
- user_allergens = [a.strip().lower() for a in user_allergens.split(',')]
73
- else:
74
- user_allergens = list(allergy_analyzer.allergy_dict.keys())
75
-
76
- logger.info(f"Processing image for allergens: {user_allergens}")
77
-
78
  # تأكد من تهيئة محلل الحساسيات
79
  if allergy_analyzer is None:
80
  init_allergy_analyzer(current_app._get_current_object())
@@ -86,8 +77,7 @@ def process_image():
86
 
87
  # تحليل الصورة
88
  analysis_results = allergy_analyzer.analyze_image(
89
- image,
90
- user_allergens,
91
  current_app.config['CLAUDE_API_KEY']
92
  )
93
 
 
66
  "supported_formats": list(ALLOWED_EXTENSIONS)
67
  }), 400
68
 
 
 
 
 
 
 
 
 
 
69
  # تأكد من تهيئة محلل الحساسيات
70
  if allergy_analyzer is None:
71
  init_allergy_analyzer(current_app._get_current_object())
 
77
 
78
  # تحليل الصورة
79
  analysis_results = allergy_analyzer.analyze_image(
80
+ image,
 
81
  current_app.config['CLAUDE_API_KEY']
82
  )
83