Spaces:
Sleeping
Sleeping
Paulus Michael Leang
commited on
Commit
•
1e0d0b5
1
Parent(s):
c8057e0
Hotfix
Browse files- app.py +1 -1
- requirements.txt +3 -1
app.py
CHANGED
@@ -23,7 +23,7 @@ def greet_json():
|
|
23 |
@app.post("/generate_chat")
|
24 |
def generateAi(request: ChatRequest):
|
25 |
messages = [
|
26 |
-
{"role": "system", "content": "You are a
|
27 |
{"role": "user", "content": request.prompt}
|
28 |
]
|
29 |
text = tokenizer.apply_chat_template(
|
|
|
23 |
@app.post("/generate_chat")
|
24 |
def generateAi(request: ChatRequest):
|
25 |
messages = [
|
26 |
+
{"role": "system", "content": "You are a Mandarin language learning assistant that only answers in Mandarin."},
|
27 |
{"role": "user", "content": request.prompt}
|
28 |
]
|
29 |
text = tokenizer.apply_chat_template(
|
requirements.txt
CHANGED
@@ -2,4 +2,6 @@ fastapi
|
|
2 |
uvicorn[standard]
|
3 |
transformers
|
4 |
pydantic
|
5 |
-
accelerator
|
|
|
|
|
|
2 |
uvicorn[standard]
|
3 |
transformers
|
4 |
pydantic
|
5 |
+
accelerator
|
6 |
+
torch
|
7 |
+
torchvision
|