Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
tokenizer = AutoTokenizer.from_pretrained("Omartificial-Intelligence-Space/Arabic-QWQ-32B-Preview")
|
5 |
-
model = AutoModelForCausalLM.from_pretrained("Omartificial-Intelligence-Space/Arabic-QWQ-32B-Preview")
|
6 |
-
|
7 |
-
# Manually perform text generation
|
8 |
-
inputs = tokenizer("Generate text example:", return_tensors="pt")
|
9 |
-
outputs = model.generate(**inputs, max_length=50)
|
10 |
-
|
11 |
-
# Decode the output
|
12 |
-
print(tokenizer.decode(outputs[0]))
|
|
|
1 |
+
# Load model directly
|
2 |
+
from transformers import AutoModel
|
3 |
+
model = AutoModel.from_pretrained("Omartificial-Intelligence-Space/Arabic-QWQ-32B-Preview")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|