memorease commited on
Commit
82ddab9
·
verified ·
1 Parent(s): 74d2ebd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -4,7 +4,7 @@ import os
4
 
5
  app = Flask(__name__)
6
 
7
- @app.route("/", methods=["POST"])
8
  def ask_question():
9
  try:
10
  client = Client("memorease/flan5_memorease")
@@ -15,6 +15,10 @@ def ask_question():
15
  return jsonify({"question": result})
16
  except Exception as e:
17
  return jsonify({"error": str(e)}), 500
 
 
 
 
18
 
19
  if __name__ == "__main__":
20
  port = int(os.environ.get("PORT", 7860))
 
4
 
5
  app = Flask(__name__)
6
 
7
+ @app.route("/ask", methods=["POST"])
8
  def ask_question():
9
  try:
10
  client = Client("memorease/flan5_memorease")
 
15
  return jsonify({"question": result})
16
  except Exception as e:
17
  return jsonify({"error": str(e)}), 500
18
+
19
+ @app.route("/", methods=["GET"])
20
+ def index():
21
+ return "Flan5 Memorease Docker Space is running!", 200
22
 
23
  if __name__ == "__main__":
24
  port = int(os.environ.get("PORT", 7860))