aditi2222 commited on
Commit
d004a35
·
1 Parent(s): 11d52f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -24
app.py CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
  import re
4
  import streamlit as st
5
 
@@ -11,31 +9,11 @@ from available_models import MODELS
11
  st.set_page_config(page_title="Translator", page_icon="🗣️")
12
  st.title("🗣️ Translator")
13
  st.subheader("Translation made fast and easy.")
14
- st.markdown("""
15
- [![GitHub](https://img.shields.io/badge/-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/ChainYo)
16
- [![HuggingFace](https://img.shields.io/badge/-yellow.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMTc1LjAwMDAwMHB0IiBoZWlnaHQ9IjE3NS4wMDAwMDBwdCIgdmlld0JveD0iMCAwIDE3NS4wMDAwMDAgMTc1LjAwMDAwMCIKIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsMTc1LjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTU2MyAxMjM2IGMtMjkgLTEzIC02MyAtNTkgLTYzIC04NiAwIC0yNiAzMyAtODAgNTIgLTg2IDE1IC00IDI2IDEKNDMgMjEgMjAgMjYgMjQgMjcgNTMgMTcgMjggLTkgMzMgLTggNDIgOCAxNyAzMiAxMSA2OSAtMTcgOTkgLTM0IDM3IC02OCA0NQotMTEwIDI3eiIvPgo8cGF0aCBkPSJNMTA2NCAxMjQwIGMtNTAgLTIwIC03NyAtODYgLTU0IC0xMzAgOSAtMTYgMTQgLTE3IDQyIC04IDI5IDEwIDMzIDkKNTUgLTE3IDIxIC0yNCAyNyAtMjYgNDggLTE3IDMxIDE0IDUxIDc2IDM2IDExNCAtMTcgNDYgLTg0IDc2IC0xMjcgNTh6Ii8+CjxwYXRoIGQ9Ik02MDAgODg4IGMwIC00OSAxNiAtOTggNTAgLTE1MSA4NSAtMTM0IDMyNSAtMTM0IDQxMCAwIDUxIDgwIDY5IDE4MwozMSAxODMgLTEwIDAgLTUwIC0xNSAtODcgLTMyIC02MCAtMjkgLTc5IC0zMyAtMTQ5IC0zMyAtNzAgMCAtODkgNCAtMTQ5IDMzCi0zNyAxNyAtNzcgMzIgLTg3IDMyIC0xNSAwIC0xOSAtNyAtMTkgLTMyeiIvPgo8L2c+Cjwvc3ZnPgo=)](https://huggingface.co/ChainYo)
17
- [![LinkedIn](https://img.shields.io/badge/-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/thomas-chaigneau-dev/)
18
- [![Discord](https://img.shields.io/badge/Chainyo%233610-%237289DA.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/)
19
- """)
20
  st.write("To add a new model, hit me up! ⬆️")
21
 
22
  with st.expander(label="❓ How does it work", expanded=True):
23
- st.markdown("""
24
- **Translator** is a **simple tool** that allows you to **translate text** from one language to another.
25
- **Translator** is powered by the [Transformers library](https://huggingface.co/transformers) and uses the
26
- [Helsinki-NLP](https://huggingface.co/Helsinki-NLP) models.
27
- Choose the **source language**, the **target language** and add some **text to translate**.
28
- **Translator** will translate the text and **save the output in a text file**. It cuts the sentences by following
29
- the punctuation marks.
30
- The output file content will also be displayed in the browser to help you understand the translation and choose
31
- if you want to download it.
32
- There is **no limit to the number of characters** that can be translated.
33
- The only limit is the time you are ready to wait! 🤗
34
- *P.S. I have built this tool to help me start writing blog posts in different languages. I am a French native speaker
35
- and I will use it to translate my potential future blog posts in English.*
36
- *P.P.S. I am a **Junior ML Engineer** passionate about **machine learning** and **data science**. Reach out to me by
37
- clicking on the socials badges above.*
38
- """)
39
 
40
  lang1, lang2 = st.columns(2)
41
  lang1.selectbox(
 
 
 
1
  import re
2
  import streamlit as st
3
 
 
9
  st.set_page_config(page_title="Translator", page_icon="🗣️")
10
  st.title("🗣️ Translator")
11
  st.subheader("Translation made fast and easy.")
12
+
 
 
 
 
 
13
  st.write("To add a new model, hit me up! ⬆️")
14
 
15
  with st.expander(label="❓ How does it work", expanded=True):
16
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  lang1, lang2 = st.columns(2)
19
  lang1.selectbox(