Update app.py
Browse files
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
|
| 233 |
iface = gr.Interface(
|
| 234 |
fn=analyze_resumes,
|
| 235 |
-
inputs=[
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
outputs=[gr.Dataframe(), gr.Textbox()],
|
| 240 |
-
live=False, # Disable auto-running during input
|
| 241 |
-
allow_flagging="never"
|
| 242 |
)
|
| 243 |
|
| 244 |
-
# Add
|
| 245 |
-
iface.
|
| 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()
|