Prashasst commited on
Commit
ffcb230
·
verified ·
1 Parent(s): 21e672a

Update app.py

Browse files

just testing one hypo

Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -320,10 +320,11 @@ Expected JSON format:
320
 
321
  # Gradio interface function
322
  def process_pdf(pdf):
323
- text = read_pdf(pdf.path) # Extract text from PDF
324
- output = generate(text) # Generate structured JSON
325
 
326
- return output
 
327
 
328
  # def show_to_UI(pdf):
329
  # # output = process_pdf(pdf) # Call process_pdf to get JSON
@@ -352,7 +353,8 @@ with gr.Blocks() as demo:
352
 
353
  # metadata_output = gr.Markdown(label="Metadata")
354
  # lab_test_output = gr.Dataframe(label="Lab Test Results")
355
- output_display = gr.JSON(label="Extracted Report") # Show JSON output
 
356
 
357
  submit_btn.click(process_pdf, inputs=[pdf_input], outputs=[output_display])
358
 
 
320
 
321
  # Gradio interface function
322
  def process_pdf(pdf):
323
+ # text = read_pdf(pdf.path) # Extract text from PDF
324
+ # output = generate(text) # Generate structured JSON
325
 
326
+ # return output
327
+ retrun f" {pdf.name} and {pdf.path}"
328
 
329
  # def show_to_UI(pdf):
330
  # # output = process_pdf(pdf) # Call process_pdf to get JSON
 
353
 
354
  # metadata_output = gr.Markdown(label="Metadata")
355
  # lab_test_output = gr.Dataframe(label="Lab Test Results")
356
+ # output_display = gr.JSON(label="Extracted Report") # Show JSON output
357
+ output_display = gr.text(label="Extracted Report") # Show JSON output
358
 
359
  submit_btn.click(process_pdf, inputs=[pdf_input], outputs=[output_display])
360