Link: https://share.streamlit.io/golden-panther/telugu_text_generator/main/telugu_text_gen.py
- Open website
- Select/input seed text
- Adjust "amount of text" value
- Click on "Submit"
- The generated text will be displayed with a success message.
Note: There are two methods of giving input. Choose any one.
- Custom input - Here, the user needs to provide a seed/prompt text (telugu).
- Select one of the readily available sample seed texts.
I integrated two APIs to achieve telugu language text generator from english text generator.
- Googletrans (a python module which enables usage of free Google translate API)
- DeepAI's text generation API (it is based on GPT-2)
I used streamlit to host this project online.
This is how the code works.....
- Take telugu text as input and store it in "telugu_query"
- Translate it to english and strore it in "english_query"
- Input this english_query to generate text using DeepAI's API and store it in "english_text"
- Translate this "english_text" into "telugu_text"
- Display the output
To use our project - go to this link: https://share.streamlit.io/golden-panther/telugu_text_generator/main/telugu_text_gen.py
(or)
To run this app
pip install -r requirements.txt
streamlit run https://github.com/raw/golden-panther/Telugu_text_generator/main/telugu_text_gen.py
(or)
To run our telugu text generator on your machine by cloning this repository,
- Type the following in your terminal or cmd:
pip install -r requirements.txt
streamlit run telugu_text_gen.py
- The web app opens up in a local host. Then you can use it for generating telugu text. That's it!