Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,14 @@ import torch
|
|
5 |
|
6 |
class ModelInput(BaseModel):
|
7 |
prompt: str
|
8 |
-
max_new_tokens: int =
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
12 |
# Initialize text generation pipeline
|
13 |
generator = pipeline(
|
14 |
"text-generation",
|
15 |
-
model="
|
16 |
device="cpu" # Use CPU (change to device=0 for GPU)
|
17 |
)
|
18 |
|
|
|
5 |
|
6 |
class ModelInput(BaseModel):
|
7 |
prompt: str
|
8 |
+
max_new_tokens: int = 128000
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
12 |
# Initialize text generation pipeline
|
13 |
generator = pipeline(
|
14 |
"text-generation",
|
15 |
+
model="Qwen/Qwen3-4B-Thinking-2507",
|
16 |
device="cpu" # Use CPU (change to device=0 for GPU)
|
17 |
)
|
18 |
|