DSatishchandra commited on
Commit
ddebeb5
·
verified ·
1 Parent(s): d71be9b

Rename BHEL.py to bhel.py

Browse files
Files changed (1) hide show
  1. BHEL.py → bhel.py +3 -3
BHEL.py → bhel.py RENAMED
@@ -54,7 +54,7 @@ def extract_data(pdf_file):
54
 
55
  # Convert data to DataFrame and save as Excel
56
  df = pd.DataFrame(data, columns=columns)
57
- excel_path = "BHEL_Output.xlsx"
58
  df.to_excel(excel_path, index=False)
59
  return excel_path
60
 
@@ -98,7 +98,7 @@ def gradio_interface(pdf_file):
98
  return extract_data(pdf_file.name)
99
 
100
  # Define Gradio interface
101
- iface = gr.Interface(
102
  fn=gradio_interface,
103
  inputs=gr.File(label="Upload PDF"),
104
  outputs=gr.File(label="Download Extracted Excel"),
@@ -107,4 +107,4 @@ iface = gr.Interface(
107
  )
108
 
109
  if __name__ == "__main__":
110
- iface.launch()
 
54
 
55
  # Convert data to DataFrame and save as Excel
56
  df = pd.DataFrame(data, columns=columns)
57
+ excel_path = "/tmp/Extracted_PO_Data_Dynamic.xlsx"
58
  df.to_excel(excel_path, index=False)
59
  return excel_path
60
 
 
98
  return extract_data(pdf_file.name)
99
 
100
  # Define Gradio interface
101
+ interface = gr.Interface(
102
  fn=gradio_interface,
103
  inputs=gr.File(label="Upload PDF"),
104
  outputs=gr.File(label="Download Extracted Excel"),
 
107
  )
108
 
109
  if __name__ == "__main__":
110
+ interface.launch()