Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def translate(hin_snippet):
|
|
22 |
model_id = "CompVis/ldm-text2im-large-256"
|
23 |
ldm = DiffusionPipeline.from_pretrained(model_id)
|
24 |
images = ldm([translated], num_inference_steps=50, eta=0.3, guidance_scale=6)["sample"]
|
25 |
-
return images
|
26 |
|
27 |
|
28 |
tokenizer = AutoTokenizer.from_pretrained("salesken/translation-hi-en")
|
@@ -34,5 +34,5 @@ model = AutoModelForSeq2SeqLM.from_pretrained("salesken/translation-hi-en")
|
|
34 |
# due to covid, we have reduced our debt interest
|
35 |
|
36 |
|
37 |
-
iface = gr.Interface(fn=translate, inputs="text",outputs=
|
38 |
iface.launch()
|
|
|
22 |
model_id = "CompVis/ldm-text2im-large-256"
|
23 |
ldm = DiffusionPipeline.from_pretrained(model_id)
|
24 |
images = ldm([translated], num_inference_steps=50, eta=0.3, guidance_scale=6)["sample"]
|
25 |
+
return images
|
26 |
|
27 |
|
28 |
tokenizer = AutoTokenizer.from_pretrained("salesken/translation-hi-en")
|
|
|
34 |
# due to covid, we have reduced our debt interest
|
35 |
|
36 |
|
37 |
+
iface = gr.Interface(fn=translate, inputs="text",outputs=gr.Gallery())
|
38 |
iface.launch()
|