DreamStream-1 commited on
Commit
6fd3d6f
·
verified ·
1 Parent(s): aba5fd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -229,19 +229,16 @@ def analyze_resumes(resumes, job_desc):
229
  def download_results(results):
230
  return results.to_csv(index=False)
231
 
232
- # Gradio Interface with Submit Button and Progress Bar
233
  iface = gr.Interface(
234
  fn=analyze_resumes,
235
- inputs=[
236
- gr.File(label="Upload Resumes (PDF, DOCX, TXT)", file_count="multiple"),
237
- gr.Textbox(label="Job Description", lines=5)
238
- ],
239
- outputs=[gr.Dataframe(), gr.Textbox()],
240
- live=False, # Disable auto-running during input
241
- allow_flagging="never"
242
  )
243
 
244
- # Add the file download option to the interface
245
- iface.add_component(gr.File(label="Download Results", file_output=download_results, visible=True))
246
 
247
  iface.launch()
 
229
  def download_results(results):
230
  return results.to_csv(index=False)
231
 
232
+ # Create Gradio Interface
233
  iface = gr.Interface(
234
  fn=analyze_resumes,
235
+ inputs=[gr.Files(label="Upload Resumes (PDF, DOCX, TXT)", file_count="multiple"), gr.Textbox(label="Enter Job Description")],
236
+ outputs=[gr.DataFrame(label="Analysis Results"), gr.Textbox(label="Resume Count Message")],
237
+ allow_flagging="never",
238
+ live=True
 
 
 
239
  )
240
 
241
+ # Add file download option to interface (this replaces the add_component method)
242
+ iface.outputs.append(gr.File(label="Download Results", file_output=download_results))
243
 
244
  iface.launch()