namberino commited on
Commit
54c2794
·
1 Parent(s): e2b5ca7

Initial commit

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -284,15 +284,21 @@ def ui_run(pdf_file, seeds_text, questions_per_seed, k_retrieve, chunk_size, chu
284
  except Exception:
285
  pass
286
 
 
 
287
  try:
288
  local_path = save_uploaded_file(pdf_file)
289
  except Exception as e:
290
  return {"error": f"Failed saving uploaded file: {e}"}
291
 
 
 
292
  seeds = [s.strip() for s in seeds_text.split(",") if s.strip()]
293
  if not seeds:
294
  seeds = ["Lấy câu hỏi tổng quát về tài liệu"]
295
 
 
 
296
  try:
297
  results = generate_mcqs_from_pdf(
298
  pdf_path=local_path,
 
284
  except Exception:
285
  pass
286
 
287
+ print(f"created {tmp_dir}")
288
+
289
  try:
290
  local_path = save_uploaded_file(pdf_file)
291
  except Exception as e:
292
  return {"error": f"Failed saving uploaded file: {e}"}
293
 
294
+ print(f"uploaded file {local_path}")
295
+
296
  seeds = [s.strip() for s in seeds_text.split(",") if s.strip()]
297
  if not seeds:
298
  seeds = ["Lấy câu hỏi tổng quát về tài liệu"]
299
 
300
+ print(f"seeds: {seeds}")
301
+
302
  try:
303
  results = generate_mcqs_from_pdf(
304
  pdf_path=local_path,