Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -1,16 +1,6 @@
|
|
1 |
-
from
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
import torch
|
8 |
-
from transformers import pipeline
|
9 |
-
|
10 |
-
# use dolly-v2-12b if you're using Colab Pro+, using pythia-2.8b for Free Colab
|
11 |
-
generate_text = pipeline(model="databricks/dolly-v2-2-8b",
|
12 |
-
torch_dtype=torch.bfloat16,
|
13 |
-
trust_remote_code=True,
|
14 |
-
device_map="auto")
|
15 |
-
txt = generate_text("Whats the difference between an apple and broccoli?")
|
16 |
-
return txt
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
generate_text = pipeline(model="databricks/dolly-v2-2-8b",
|
3 |
+
torch_dtype=torch.bfloat16,
|
4 |
+
trust_remote_code=True,
|
5 |
+
device_map="auto")
|
6 |
+
generate_text("Whats the difference between an apple and broccoli?")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|