lucidrains / big-sleep

A simple command line tool for text to image generation, using OpenAI's CLIP and a BigGAN. Technique was originally created by https://twitter.com/advadnoun
MIT License
2.57k stars 304 forks source link

It's possible to use it in another languaje? #37

Closed gamanox closed 3 years ago

gamanox commented 3 years ago

what could be the way to make it work on another languaje? thanks a lot

htoyryla commented 3 years ago

I've seen a Colab of a similar project using Google translate to translate a prompt to English.

https://colab.research.google.com/drive/1rJMSyF_dmpL1kmse7Rm9TurjihJ_cA5t?fbclid=IwAR2KwCQXhL2u5OP_uhf46_9iqJofNbgW41h33pI2pRO_4caBiprtyKUTLfk#scrollTo=JUvpdy8BWGuM

I just quickly tried. First install googletrans:

pip install googletrans==3.1.0a0

and then in python:

from googletrans import Translator
translator = Translator()
translator.translate(text="maalaus vanhasta talosta puiden keskellä", src='fi', dest='en').text

which gives "'painting of an old house in the middle of trees'"

gamanox commented 3 years ago

thank you very much