Euryeth commited on
Commit
8a9f79f
·
verified ·
1 Parent(s): c08a965

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -36,6 +36,10 @@ generator = pipeline(
36
  # Flask app
37
  app = Flask(__name__)
38
 
 
 
 
 
39
  @app.route("/v1/chat/completions", methods=["POST"])
40
  def chat():
41
  # Token auth: require Bearer token
@@ -82,4 +86,5 @@ def chat():
82
  })
83
 
84
  if __name__ == "__main__":
85
- app.run(host="0.0.0.0", port=8081)
 
 
36
  # Flask app
37
  app = Flask(__name__)
38
 
39
+ @app.route("/")
40
+ def home():
41
+ return "API is running"
42
+
43
  @app.route("/v1/chat/completions", methods=["POST"])
44
  def chat():
45
  # Token auth: require Bearer token
 
86
  })
87
 
88
  if __name__ == "__main__":
89
+ # Listen on port 8080 as required by HF Spaces
90
+ app.run(host="0.0.0.0", port=8080)