Allen Park commited on
Commit
cd79d24
·
1 Parent(s): ee765f5

fix(comment out raising error for large token size: possibly breaking error)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -228,8 +228,8 @@ def upload_file(filepath):
228
  extracted_file_text = extract_text_python_docx(filepath)
229
 
230
  # return warning if file is too large
231
- if not return_approximate_token_size(extracted_file_text):
232
- raise gr.Error("File is too large to process. Please upload a smaller file.")
233
 
234
  return [gr.UploadButton(visible=False), gr.Group(visible=True), gr.Markdown(f"**Uploaded file:** {name}"), extracted_file_text]
235
  else:
 
228
  extracted_file_text = extract_text_python_docx(filepath)
229
 
230
  # return warning if file is too large
231
+ # if not return_approximate_token_size(extracted_file_text):
232
+ # raise gr.Error("File is too large to process. Please upload a smaller file.")
233
 
234
  return [gr.UploadButton(visible=False), gr.Group(visible=True), gr.Markdown(f"**Uploaded file:** {name}"), extracted_file_text]
235
  else: