jackkuo commited on
Commit
b7fdd18
·
verified ·
1 Parent(s): 2a379da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def predict(input_text, pdf_file):
42
  if pdf_file is None:
43
  return "Please upload a PDF file to proceed."
44
 
45
- file_content = extract_pdf_pypdf(pdf_file.name)
46
  messages = [
47
  {
48
  "role": "system",
@@ -134,7 +134,7 @@ with gr.Blocks(title="Automated Enzyme Kinetics Extractor for Markdown") as demo
134
  """)
135
  extract_button.click(extract_pdf_pypdf, inputs=file_input, outputs=text_output)
136
  exp.click(update_input, outputs=model_input)
137
- gen.click(fn=predict, inputs=[model_input, file_input], outputs=outputs)
138
  clr.click(fn=lambda: [gr.update(value=""), gr.update(value="")], inputs=None, outputs=[model_input, outputs])
139
 
140
 
 
42
  if pdf_file is None:
43
  return "Please upload a PDF file to proceed."
44
 
45
+ file_content = pdf_file # extract_pdf_pypdf(pdf_file.name)
46
  messages = [
47
  {
48
  "role": "system",
 
134
  """)
135
  extract_button.click(extract_pdf_pypdf, inputs=file_input, outputs=text_output)
136
  exp.click(update_input, outputs=model_input)
137
+ gen.click(fn=predict, inputs=[model_input, text_output], outputs=outputs)
138
  clr.click(fn=lambda: [gr.update(value=""), gr.update(value="")], inputs=None, outputs=[model_input, outputs])
139
 
140