abhisheky127 commited on
Commit
f885ab0
·
1 Parent(s): 3ba7cbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -11,6 +11,9 @@ ar_en_model_name = "Helsinki-NLP/opus-mt-ar-en"
11
  ar_en_model = MarianMTModel.from_pretrained(ar_en_model_name)
12
  ar_en_tokenizer = MarianTokenizer.from_pretrained(ar_en_model_name)
13
 
 
 
 
14
  def translate_en_to_ar(text):
15
  inputs = en_ar_tokenizer.encode(text, return_tensors="pt")
16
  translation = en_ar_model.generate(inputs, max_length=128)
@@ -41,7 +44,8 @@ ar_en_interface = gr.Interface(
41
  )
42
 
43
  # Combine the interfaces in a single app
44
- app = gr.Interface(
 
45
  [en_ar_interface, ar_en_interface],
46
  layout="horizontal",
47
  title="Translation App",
 
11
  ar_en_model = MarianMTModel.from_pretrained(ar_en_model_name)
12
  ar_en_tokenizer = MarianTokenizer.from_pretrained(ar_en_model_name)
13
 
14
+ title = "Fold: Contextual Tag Recommendation System"
15
+ description = "powered by bart-large-mnli, made by @abhisheky127"
16
+
17
  def translate_en_to_ar(text):
18
  inputs = en_ar_tokenizer.encode(text, return_tensors="pt")
19
  translation = en_ar_model.generate(inputs, max_length=128)
 
44
  )
45
 
46
  # Combine the interfaces in a single app
47
+ app = gr.Interface(title=title,
48
+ description=description,
49
  [en_ar_interface, ar_en_interface],
50
  layout="horizontal",
51
  title="Translation App",