Spaces:
Runtime error
Runtime error
JuanjoRosquete
commited on
Commit
•
4471392
1
Parent(s):
c493409
Add application file
Browse files
app.py
CHANGED
@@ -2,16 +2,15 @@
|
|
2 |
# -*- coding: utf-8 -*-
|
3 |
import os
|
4 |
|
5 |
-
print("Installing
|
6 |
-
os.system("pip
|
7 |
-
os.system("pip install tf-keras")
|
8 |
-
os.system("pip install diffusers")
|
9 |
-
os.system("pip install accelerate")
|
10 |
-
os.system("pip install transformers")
|
11 |
-
os.system("pip install numpy")
|
12 |
-
os.system("pip install torch")
|
13 |
-
os.system("pip install
|
14 |
-
os.system("pip install --upgrade pip")
|
15 |
|
16 |
print("Installing Finished!")
|
17 |
|
@@ -27,8 +26,8 @@ from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
|
|
27 |
model_id = "stabilityai/stable-diffusion-2"
|
28 |
|
29 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
30 |
-
image_model = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.
|
31 |
-
image_model = image_model.to("
|
32 |
|
33 |
model = pipeline("automatic-speech-recognition","facebook/wav2vec2-large-xlsr-53-spanish")
|
34 |
|
|
|
2 |
# -*- coding: utf-8 -*-
|
3 |
import os
|
4 |
|
5 |
+
print("Installing...")
|
6 |
+
os.system("!pip install gradio")
|
7 |
+
os.system("!pip install tf-keras")
|
8 |
+
os.system("!pip install diffusers")
|
9 |
+
os.system("!pip install accelerate")
|
10 |
+
os.system("!pip install transformers")
|
11 |
+
os.system("!pip install numpy")
|
12 |
+
os.system("!pip install torch")
|
13 |
+
#os.system("pip install --upgrade pip")
|
|
|
14 |
|
15 |
print("Installing Finished!")
|
16 |
|
|
|
26 |
model_id = "stabilityai/stable-diffusion-2"
|
27 |
|
28 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
29 |
+
image_model = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float32)
|
30 |
+
image_model = image_model.to("cpu")
|
31 |
|
32 |
model = pipeline("automatic-speech-recognition","facebook/wav2vec2-large-xlsr-53-spanish")
|
33 |
|