Spaces:
Running
Running
Commit
·
886367a
1
Parent(s):
07d17d6
return type
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def generate(text: str):
|
|
41 |
# print(output)
|
42 |
|
43 |
print(output)
|
44 |
-
|
45 |
|
46 |
@app.post("/chat")
|
47 |
def chat(request: ChatRequest):
|
@@ -50,4 +50,4 @@ def chat(request: ChatRequest):
|
|
50 |
"""
|
51 |
|
52 |
output = pipe(request.conversationHistory, num_return_sequences=1, max_new_tokens=250)
|
53 |
-
return output
|
|
|
41 |
# print(output)
|
42 |
|
43 |
print(output)
|
44 |
+
|
45 |
|
46 |
@app.post("/chat")
|
47 |
def chat(request: ChatRequest):
|
|
|
50 |
"""
|
51 |
|
52 |
output = pipe(request.conversationHistory, num_return_sequences=1, max_new_tokens=250)
|
53 |
+
return {"output": output[0]["generated_text"][-1]['content']}
|