Ramji commited on
Commit
3fa3274
1 Parent(s): ee71d99

updated app

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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 render_template('index.html')
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