sreepathi-ravikumar commited on
Commit
9533112
·
verified ·
1 Parent(s): 5c58195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -6,7 +6,6 @@ from text2generation import generate_long_answer # Your own function
6
 
7
  app = Flask(__name__)
8
  CORS(app)
9
- temp_data={}
10
 
11
  @app.route('/health')
12
  def health_check():
@@ -16,7 +15,6 @@ def health_check():
16
  @app.route('/ask', methods=['POST'])
17
  def ask_question():
18
  try:
19
- global temp_data
20
  data = request.get_json()
21
  question = data.get('question', '').strip()
22
 
@@ -24,7 +22,6 @@ def ask_question():
24
  return jsonify({"error": "Question is required"}), 400
25
 
26
  answer = generate_long_answer(question)
27
- temp_data['answered']=answer
28
  return jsonify({"question": question, "answer": answer})
29
 
30
  except Exception as e:
 
6
 
7
  app = Flask(__name__)
8
  CORS(app)
 
9
 
10
  @app.route('/health')
11
  def health_check():
 
15
  @app.route('/ask', methods=['POST'])
16
  def ask_question():
17
  try:
 
18
  data = request.get_json()
19
  question = data.get('question', '').strip()
20
 
 
22
  return jsonify({"error": "Question is required"}), 400
23
 
24
  answer = generate_long_answer(question)
 
25
  return jsonify({"question": question, "answer": answer})
26
 
27
  except Exception as e: