rexprimematrix commited on
Commit
67b7178
·
verified ·
1 Parent(s): b3cc0fa

Update brain.py

Browse files
Files changed (1) hide show
  1. brain.py +10 -0
brain.py CHANGED
@@ -70,6 +70,16 @@ Rules:
70
  @app.route("/api/chat", methods=["POST"])
71
  def stream():
72
 
 
 
 
 
 
 
 
 
 
 
73
  if model is None:
74
 
75
  return Response(
 
70
  @app.route("/api/chat", methods=["POST"])
71
  def stream():
72
 
73
+ def generate():
74
+
75
+ yield "data: Hello World\n\n"
76
+ yield "data: [DONE]\n\n"
77
+
78
+ return Response(
79
+ generate(),
80
+ mimetype="text/event-stream"
81
+ )
82
+
83
  if model is None:
84
 
85
  return Response(