Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import AutoModel, AutoTokenizer
|
|
|
|
| 3 |
|
| 4 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B")
|
| 5 |
model = AutoModel.from_pretrained("Qwen/Qwen3-0.6B")
|
|
@@ -18,4 +19,6 @@ def message(req):
|
|
| 18 |
attention_mask=inputs["attention_mask"],
|
| 19 |
temperature=0.3
|
| 20 |
)
|
| 21 |
-
return tokenizer.decode(output[0], skip_special_tokens=True)
|
|
|
|
|
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import AutoModel, AutoTokenizer
|
| 3 |
+
import uvicorn
|
| 4 |
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B")
|
| 6 |
model = AutoModel.from_pretrained("Qwen/Qwen3-0.6B")
|
|
|
|
| 19 |
attention_mask=inputs["attention_mask"],
|
| 20 |
temperature=0.3
|
| 21 |
)
|
| 22 |
+
return tokenizer.decode(output[0], skip_special_tokens=True)
|
| 23 |
+
|
| 24 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|