Ahmed235 commited on
Commit
5833f42
·
verified ·
1 Parent(s): 09ca2da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def predict_pptx_content(file_path):
29
  prediction = {
30
  "Summary": summary,
31
  "Evaluation": f"Evaluate the topic according to {predicted_label} is: {predicted_probability}",
32
- "Predicted Label": predicted_label,
33
  }
34
 
35
  return prediction
@@ -43,7 +43,7 @@ def predict_pptx_content(file_path):
43
  iface = gr.Interface(
44
  fn=predict_pptx_content,
45
  inputs=gr.File(type="filepath", label="Upload PowerPoint (.pptx) file"),
46
- outputs=[gr.Textbox("Summary"), gr.Textbox("Evaluation"), gr.Textbox("Predicted Label")],
47
  live=False, # Change to True for one-time analysis
48
  title="<h1 style='color: lightgreen; text-align: center;'>HackTalk Analyzer</h1>",
49
  )
 
29
  prediction = {
30
  "Summary": summary,
31
  "Evaluation": f"Evaluate the topic according to {predicted_label} is: {predicted_probability}",
32
+ "Predicted_Label": predicted_label, # Adjusted key to match Gradio output key
33
  }
34
 
35
  return prediction
 
43
  iface = gr.Interface(
44
  fn=predict_pptx_content,
45
  inputs=gr.File(type="filepath", label="Upload PowerPoint (.pptx) file"),
46
+ outputs=[gr.Textbox("Summary"), gr.Textbox("Evaluation"), gr.Textbox("Predicted_Label")], # Adjusted output keys
47
  live=False, # Change to True for one-time analysis
48
  title="<h1 style='color: lightgreen; text-align: center;'>HackTalk Analyzer</h1>",
49
  )