namberino commited on
Commit
12a4e6c
·
1 Parent(s): b982ee6
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,6 @@ def read_file_input(file_obj):
37
  print("path string")
38
  try:
39
  with open(file_obj, "rb") as f:
40
- print(f.read())
41
  return f.read()
42
  except Exception:
43
  # not a path, fall through to try encoding string
@@ -101,6 +100,7 @@ def call_generate(file_obj, topics, n_questions, difficulty, question_type):
101
 
102
  # Read the uploaded file bytes and create multipart payload
103
  file_bytes = read_file_input(file_obj)
 
104
  if not file_bytes:
105
  return {"error": "Could not read uploaded file (empty or unknown format)."}
106
  files = {"file": file_bytes}
 
37
  print("path string")
38
  try:
39
  with open(file_obj, "rb") as f:
 
40
  return f.read()
41
  except Exception:
42
  # not a path, fall through to try encoding string
 
100
 
101
  # Read the uploaded file bytes and create multipart payload
102
  file_bytes = read_file_input(file_obj)
103
+ print(file_bytes)
104
  if not file_bytes:
105
  return {"error": "Could not read uploaded file (empty or unknown format)."}
106
  files = {"file": file_bytes}