Brij1808 commited on
Commit
b8b7834
1 Parent(s): 1beb49a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -6,10 +6,21 @@ import translators as ts
6
  def blog_gen(phrase):
7
  ts.google
8
  ts._google.language_map
9
- eng_other = ts.google(phrase, from_language='en', to_language='de')
10
- other_eng = ts.google(eng_other, from_language='de', to_language='en')
11
-
12
- return other_eng
 
 
 
 
 
 
 
 
 
 
 
13
 
14
 
15
  iface = gr.Interface(fn=blog_gen,
 
6
  def blog_gen(phrase):
7
  ts.google
8
  ts._google.language_map
9
+ eng_de = ts.google(phrase, from_language='en', to_language='de')
10
+ eng_ar = ts.google(phrase, from_language='en', to_language='ar')
11
+ eng_fr = ts.google(phrase, from_language='en', to_language='fr')
12
+ eng_zh = ts.google(phrase, from_language='en', to_language='zh')
13
+ eng_ur = ts.google(phrase, from_language='en', to_language='ur')
14
+ eng_sv = ts.google(phrase, from_language='en', to_language='sv')
15
+
16
+ de_eng = ts.google(eng_de, from_language='de', to_language='en')
17
+ de_ar = ts.google(eng_ar, from_language='ar', to_language='en')
18
+ de_fr = ts.google(eng_fr, from_language='fr', to_language='en')
19
+ de_zh = ts.google(eng_zh, from_language='zh', to_language='en')
20
+ de_ur = ts.google(eng_ur, from_language='ur', to_language='en')
21
+ de_sv = ts.google(eng_sv, from_language='sv', to_language='en')
22
+
23
+ return de_eng,de_ar,de_fr,de_zh,de_ur,de_sv
24
 
25
 
26
  iface = gr.Interface(fn=blog_gen,