Update app.py
Browse files
app.py
CHANGED
|
@@ -44,11 +44,11 @@ def generate(query: Query):
|
|
| 44 |
# Decode & extract assistant response
|
| 45 |
output_string = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
| 46 |
response = output_string.split("assistant")[-1].strip()
|
| 47 |
-
return response
|
| 48 |
|
| 49 |
@app.get("/")
|
| 50 |
def root():
|
| 51 |
-
return {"debai API is running!"}
|
| 52 |
|
| 53 |
if __name__ == "__main__":
|
| 54 |
import uvicorn
|
|
|
|
| 44 |
# Decode & extract assistant response
|
| 45 |
output_string = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
| 46 |
response = output_string.split("assistant")[-1].strip()
|
| 47 |
+
return {"response": response}
|
| 48 |
|
| 49 |
@app.get("/")
|
| 50 |
def root():
|
| 51 |
+
return {"debai": "API is running!"}
|
| 52 |
|
| 53 |
if __name__ == "__main__":
|
| 54 |
import uvicorn
|