Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from pptx import Presentation # Import the Presentation class
|
|
4 |
|
5 |
# Create a text classification pipeline
|
6 |
classifier = pipeline("text-classification", model="Ahmed235/roberta_classification", tokenizer="Ahmed235/roberta_classification")
|
7 |
-
|
8 |
def extract_text_from_pptx(file_path):
|
9 |
presentation = Presentation(file_path)
|
10 |
text = []
|
@@ -26,6 +26,7 @@ def predict_pptx_content(file_path):
|
|
26 |
|
27 |
prediction = {
|
28 |
"Evaluation": f"Evaluate the topic according to {predicted_label} is: {predicted_probability}",
|
|
|
29 |
}
|
30 |
|
31 |
return prediction
|
|
|
4 |
|
5 |
# Create a text classification pipeline
|
6 |
classifier = pipeline("text-classification", model="Ahmed235/roberta_classification", tokenizer="Ahmed235/roberta_classification")
|
7 |
+
summarizer = pipeline("summarization", model="Falconsai/text_summarization")
|
8 |
def extract_text_from_pptx(file_path):
|
9 |
presentation = Presentation(file_path)
|
10 |
text = []
|
|
|
26 |
|
27 |
prediction = {
|
28 |
"Evaluation": f"Evaluate the topic according to {predicted_label} is: {predicted_probability}",
|
29 |
+
"Summary": summary
|
30 |
}
|
31 |
|
32 |
return prediction
|