Spaces:
Sleeping
Sleeping
Commit ·
ac30b3e
1
Parent(s): e483a33
commit 00000005
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ except ImportError:
|
|
| 20 |
def GPU(func): return func
|
| 21 |
|
| 22 |
# ✅ Flask setup
|
| 23 |
-
|
| 24 |
-
swagger = Swagger(
|
| 25 |
"swagger": "2.0",
|
| 26 |
"info": {
|
| 27 |
"title": "ChatMate Real-Time API",
|
|
@@ -98,7 +98,7 @@ def generate_full_reply(message, history):
|
|
| 98 |
return reply.strip()
|
| 99 |
|
| 100 |
# ✅ Flask streaming endpoint
|
| 101 |
-
@
|
| 102 |
@swag_from({
|
| 103 |
'tags': ['Chat'],
|
| 104 |
'consumes': ['application/json'],
|
|
|
|
| 20 |
def GPU(func): return func
|
| 21 |
|
| 22 |
# ✅ Flask setup
|
| 23 |
+
flask_app = Flask(__name__, static_folder="static", template_folder="templates")
|
| 24 |
+
swagger = Swagger(flask_app, template={
|
| 25 |
"swagger": "2.0",
|
| 26 |
"info": {
|
| 27 |
"title": "ChatMate Real-Time API",
|
|
|
|
| 98 |
return reply.strip()
|
| 99 |
|
| 100 |
# ✅ Flask streaming endpoint
|
| 101 |
+
@flask_app.route("/chat-stream", methods=["POST"])
|
| 102 |
@swag_from({
|
| 103 |
'tags': ['Chat'],
|
| 104 |
'consumes': ['application/json'],
|