mohammed-aljafry commited on
Commit
034c3f1
·
verified ·
1 Parent(s): c8c4d6b

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -227,7 +227,17 @@ with gr.Blocks(title="Interfuser Demo", theme=gr.themes.Soft()) as demo:
227
 
228
  # قراءة النماذج والسيناريوهات المتاحة من المجلدات
229
  try:
 
 
 
 
 
230
  available_models = [f for f in os.listdir(MODEL_DIR) if f.endswith(('.pth', '.pt'))]
 
 
 
 
 
231
  available_scenarios = [d for d in os.listdir(SAMPLE_DATA_DIR) if os.path.isdir(os.path.join(SAMPLE_DATA_DIR, d))]
232
  except FileNotFoundError as e:
233
  gr.Error(f"خطأ في إعداد الواجهة: {e}. هل قمت بإنشاء مجلدي 'model' و 'sample_data'؟")
 
227
 
228
  # قراءة النماذج والسيناريوهات المتاحة من المجلدات
229
  try:
230
+ # 💡 أضف هذين السطرين للطباعة التشخيصية
231
+ print("================== DEBUGGING ==================")
232
+ print(f"🔍 Current working directory is: {os.getcwd()}")
233
+ print(f"📂 Searching for models in folder: {os.path.abspath(MODEL_DIR)}")
234
+
235
  available_models = [f for f in os.listdir(MODEL_DIR) if f.endswith(('.pth', '.pt'))]
236
+
237
+ # 💡 وهذا السطر أيضًا
238
+ print(f"✅ Found models: {available_models}")
239
+ print("=============================================")
240
+
241
  available_scenarios = [d for d in os.listdir(SAMPLE_DATA_DIR) if os.path.isdir(os.path.join(SAMPLE_DATA_DIR, d))]
242
  except FileNotFoundError as e:
243
  gr.Error(f"خطأ في إعداد الواجهة: {e}. هل قمت بإنشاء مجلدي 'model' و 'sample_data'؟")