Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -13,10 +13,10 @@ else:
|
|
| 13 |
is_gpu = True
|
| 14 |
print(is_gpu)
|
| 15 |
|
| 16 |
-
|
| 17 |
from IPython.display import clear_output
|
| 18 |
|
| 19 |
|
|
|
|
| 20 |
def check_enviroment():
|
| 21 |
try:
|
| 22 |
import torch
|
|
@@ -164,7 +164,7 @@ clear_output()
|
|
| 164 |
from IPython.display import display
|
| 165 |
|
| 166 |
|
| 167 |
-
def generate_image(prompt="A beautiful and sexy girl"):
|
| 168 |
# Generate the image using the prompt
|
| 169 |
generated_image = generate(
|
| 170 |
prompt=prompt,
|
|
@@ -174,7 +174,7 @@ def generate_image(prompt="A beautiful and sexy girl"):
|
|
| 174 |
height=1024,
|
| 175 |
guidance_scale=0.0,
|
| 176 |
num_inference_steps=4,
|
| 177 |
-
secret_token=
|
| 178 |
)
|
| 179 |
# Display the image in the Jupyter Notebook
|
| 180 |
display(generated_image)
|
|
|
|
| 13 |
is_gpu = True
|
| 14 |
print(is_gpu)
|
| 15 |
|
|
|
|
| 16 |
from IPython.display import clear_output
|
| 17 |
|
| 18 |
|
| 19 |
+
|
| 20 |
def check_enviroment():
|
| 21 |
try:
|
| 22 |
import torch
|
|
|
|
| 164 |
from IPython.display import display
|
| 165 |
|
| 166 |
|
| 167 |
+
def generate_image(prompt="A beautiful and sexy girl",secret_token="default_secret"):
|
| 168 |
# Generate the image using the prompt
|
| 169 |
generated_image = generate(
|
| 170 |
prompt=prompt,
|
|
|
|
| 174 |
height=1024,
|
| 175 |
guidance_scale=0.0,
|
| 176 |
num_inference_steps=4,
|
| 177 |
+
secret_token=secret_token
|
| 178 |
)
|
| 179 |
# Display the image in the Jupyter Notebook
|
| 180 |
display(generated_image)
|