khoatran94 commited on
Commit
bbbdb3f
·
1 Parent(s): ee3e2d2
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -64,10 +64,7 @@ def query_huggingface(text):
64
 
65
  # Gradio Interface for PDF Processing
66
  def process_file(file, query):
67
- temp_file_path = "temp_uploaded_file"
68
- with open(temp_file_path, "wb") as temp_file:
69
- temp_file.write(file.read())
70
- pdf_output = read_pdf(temp_file_path)
71
  huggingface_output = query_huggingface(query)
72
  return pdf_output, huggingface_output
73
 
 
64
 
65
  # Gradio Interface for PDF Processing
66
  def process_file(file, query):
67
+ pdf_output = read_pdf(file.name)
 
 
 
68
  huggingface_output = query_huggingface(query)
69
  return pdf_output, huggingface_output
70