Update app.py
Browse files
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 |
-
"
|
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("
|
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 |
)
|