Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,14 @@ from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
|
| 3 |
import pytesseract
|
| 4 |
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
from transformers import
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
|
|
|
|
| 3 |
import pytesseract
|
| 4 |
|
| 5 |
|
| 6 |
+
# Use a pipeline as a high-level helper
|
| 7 |
+
from transformers import pipeline
|
| 8 |
+
|
| 9 |
+
messages = [
|
| 10 |
+
{"role": "user", "content": "Who are you?"},
|
| 11 |
+
]
|
| 12 |
+
pipe = pipeline("text-generation", model="sambanovasystems/SambaLingo-Arabic-Chat")
|
| 13 |
+
pipe(messages)
|
| 14 |
|
| 15 |
|
| 16 |
|