Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,6 @@ def modelo1(audio):
|
|
12 |
print(np.array(audio[1]))
|
13 |
text = whisper(np.array(audio[1]))
|
14 |
return text["text"]
|
15 |
-
|
16 |
def modelo2(text):
|
17 |
model_id = "stabilityai/stable-diffusion-2-1"
|
18 |
|
@@ -21,7 +20,7 @@ def modelo2(text):
|
|
21 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
22 |
pipe = pipe.to("cpu")
|
23 |
|
24 |
-
text =
|
25 |
image = pipe(text).images[0]
|
26 |
|
27 |
return image
|
|
|
12 |
print(np.array(audio[1]))
|
13 |
text = whisper(np.array(audio[1]))
|
14 |
return text["text"]
|
|
|
15 |
def modelo2(text):
|
16 |
model_id = "stabilityai/stable-diffusion-2-1"
|
17 |
|
|
|
20 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
21 |
pipe = pipe.to("cpu")
|
22 |
|
23 |
+
text = torch.tensor(text, dtype=torch.float32) # Conversión a float32
|
24 |
image = pipe(text).images[0]
|
25 |
|
26 |
return image
|