Upload black-forest-labs_FLUX.1-dev_2.py with huggingface_hub
Browse files
black-forest-labs_FLUX.1-dev_2.py
CHANGED
|
@@ -11,12 +11,8 @@
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
| 17 |
-
|
| 18 |
-
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
| 19 |
-
image = pipe(prompt).images[0]
|
| 20 |
with open('black-forest-labs_FLUX.1-dev_2.txt', 'w', encoding='utf-8') as f:
|
| 21 |
f.write('Everything was good in black-forest-labs_FLUX.1-dev_2.txt')
|
| 22 |
except Exception as e:
|
|
@@ -31,12 +27,8 @@ except Exception as e:
|
|
| 31 |
with open('black-forest-labs_FLUX.1-dev_2.txt', 'a', encoding='utf-8') as f:
|
| 32 |
import traceback
|
| 33 |
f.write('''```CODE:
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
| 37 |
-
|
| 38 |
-
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
| 39 |
-
image = pipe(prompt).images[0]
|
| 40 |
```
|
| 41 |
|
| 42 |
ERROR:
|
|
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
+
import os
|
| 15 |
+
os.environ['HF_TOKEN'] = 'YOUR_TOKEN_HERE'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
with open('black-forest-labs_FLUX.1-dev_2.txt', 'w', encoding='utf-8') as f:
|
| 17 |
f.write('Everything was good in black-forest-labs_FLUX.1-dev_2.txt')
|
| 18 |
except Exception as e:
|
|
|
|
| 27 |
with open('black-forest-labs_FLUX.1-dev_2.txt', 'a', encoding='utf-8') as f:
|
| 28 |
import traceback
|
| 29 |
f.write('''```CODE:
|
| 30 |
+
import os
|
| 31 |
+
os.environ['HF_TOKEN'] = 'YOUR_TOKEN_HERE'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
```
|
| 33 |
|
| 34 |
ERROR:
|