Commit
·
5fd11ce
1
Parent(s):
b528dd0
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ from transformers import pipeline
|
|
4 |
import os
|
5 |
TOKEN = os.getenv('HUGGING_FACE_HUB_TOKEN')
|
6 |
|
7 |
-
|
8 |
|
9 |
translator = pipeline("translation", model="barghavani/en_to_fr_translation_model",use_auth_token=TOKEN)
|
10 |
|
11 |
tran_fun = lambda x: translator(x)[0]['translation_text']
|
12 |
-
|
13 |
|
14 |
demo = gr.Interface(
|
15 |
fn = tran_fun,
|
|
|
4 |
import os
|
5 |
TOKEN = os.getenv('HUGGING_FACE_HUB_TOKEN')
|
6 |
|
7 |
+
|
8 |
|
9 |
translator = pipeline("translation", model="barghavani/en_to_fr_translation_model",use_auth_token=TOKEN)
|
10 |
|
11 |
tran_fun = lambda x: translator(x)[0]['translation_text']
|
12 |
+
|
13 |
|
14 |
demo = gr.Interface(
|
15 |
fn = tran_fun,
|