Spaces:
Runtime error
Runtime error
updated app
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ summarizer = pipeline("summarization", model="Ramji/bart-cn-large-medical-summar
|
|
9 |
# Route to display the home page
|
10 |
@app.route('/')
|
11 |
def home():
|
12 |
-
return
|
13 |
|
14 |
# Route to handle the summarization request
|
15 |
@app.route('/summarize', methods=['POST'])
|
@@ -19,6 +19,7 @@ def summarize():
|
|
19 |
if text:
|
20 |
# Perform summarization
|
21 |
summary = summarizer(text)
|
|
|
22 |
return jsonify({"summary": summary[0]['summary_text']})
|
23 |
else:
|
24 |
return jsonify({"error": "No text provided"}), 400
|
|
|
9 |
# Route to display the home page
|
10 |
@app.route('/')
|
11 |
def home():
|
12 |
+
return {"Deplyed Successfully"}
|
13 |
|
14 |
# Route to handle the summarization request
|
15 |
@app.route('/summarize', methods=['POST'])
|
|
|
19 |
if text:
|
20 |
# Perform summarization
|
21 |
summary = summarizer(text)
|
22 |
+
print(summary)
|
23 |
return jsonify({"summary": summary[0]['summary_text']})
|
24 |
else:
|
25 |
return jsonify({"error": "No text provided"}), 400
|