Spaces:
Runtime error
Runtime error
Upload 3 files
Browse files
app.py
CHANGED
|
@@ -20,8 +20,7 @@ pipe = pipeline(
|
|
| 20 |
)
|
| 21 |
|
| 22 |
YOUR_TOKEN="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"
|
| 23 |
-
image_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4",
|
| 24 |
-
image_pipe.to("cpu")
|
| 25 |
|
| 26 |
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-it-en")
|
| 27 |
|
|
@@ -44,8 +43,6 @@ def transcribe(microphone, file_upload):
|
|
| 44 |
translate = translate[0]["translation_text"]
|
| 45 |
|
| 46 |
image = image_pipe(translate)["sample"][0]
|
| 47 |
-
#output = diffuser_pipeline(translate)
|
| 48 |
-
#image = output.images[0]
|
| 49 |
|
| 50 |
return warn_output + text, translate, image
|
| 51 |
|
|
|
|
| 20 |
)
|
| 21 |
|
| 22 |
YOUR_TOKEN="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"
|
| 23 |
+
image_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
|
|
|
|
| 24 |
|
| 25 |
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-it-en")
|
| 26 |
|
|
|
|
| 43 |
translate = translate[0]["translation_text"]
|
| 44 |
|
| 45 |
image = image_pipe(translate)["sample"][0]
|
|
|
|
|
|
|
| 46 |
|
| 47 |
return warn_output + text, translate, image
|
| 48 |
|