Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
|
|
7 |
from datetime import datetime
|
8 |
torch.set_grad_enabled(False)
|
9 |
|
10 |
-
model = Qwen2ForSequenceClassification.from_pretrained("Thouph/prompt2tag-qwen2-0.5b-v0.1", num_labels = 9940,
|
11 |
model.eval()
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B")
|
13 |
|
|
|
7 |
from datetime import datetime
|
8 |
torch.set_grad_enabled(False)
|
9 |
|
10 |
+
model = Qwen2ForSequenceClassification.from_pretrained("Thouph/prompt2tag-qwen2-0.5b-v0.1", num_labels = 9940, device_map="cpu")
|
11 |
model.eval()
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B")
|
13 |
|