Preeeeet commited on
Commit
9062061
·
verified ·
1 Parent(s): 34db2b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -78,27 +78,27 @@ def process_images(images, job_number, job_name, job_address):
78
 
79
  return output_path
80
 
81
- # HTML code for the logo at the top of the Gradio interface
82
- logo_html = """
83
  <div style="text-align: center;">
84
- <img src="https://i.ibb.co/5Lm66yX/ezgif-com-webp-to-gif-converter.gif" alt="Logo" width="100">
 
85
  </div>
86
  """
87
 
88
- # Create the Gradio interface with HTML for logo, and input fields for Job Number, Job Name, and Job Address
89
  iface = gr.Interface(
90
  fn=process_images,
91
  inputs=[
92
- gr.HTML(logo_html), # Embed logo as HTML at the top
93
  gr.File(file_count="multiple", type="filepath", label="Upload Images"),
94
  gr.Textbox(label="Job Number"),
95
  gr.Textbox(label="Job Name"),
96
  gr.Textbox(label="Job Address")
97
  ],
98
  outputs=gr.File(label="Download Report"),
99
- title="HKC Report Generator",
100
- description="Upload images and provide job details to generate a Word report with job information and 2x2 image layout."
101
  )
102
 
103
- # Launch the app
104
- iface.launch()
 
78
 
79
  return output_path
80
 
81
+ # HTML code to display the logo and title together
82
+ title_with_logo = """
83
  <div style="text-align: center;">
84
+ <img src="logo.png" alt="Logo" width="100"><br>
85
+ <h1>HKC Report Generator</h1>
86
  </div>
87
  """
88
 
89
+ # Create the Gradio interface with job inputs
90
  iface = gr.Interface(
91
  fn=process_images,
92
  inputs=[
 
93
  gr.File(file_count="multiple", type="filepath", label="Upload Images"),
94
  gr.Textbox(label="Job Number"),
95
  gr.Textbox(label="Job Name"),
96
  gr.Textbox(label="Job Address")
97
  ],
98
  outputs=gr.File(label="Download Report"),
99
+ title=title_with_logo,
100
+ description="Upload images and provide job details to generate a Word report with job information and 2x2 image layout.",
101
  )
102
 
103
+ # Launch the app with shareable link option
104
+ iface.launch(share=True)