mrm8488 commited on
Commit
44b47e7
1 Parent(s): 751a229
__pycache__/langs.cpython-310.pyc ADDED
Binary file (2.16 kB). View file
 
__pycache__/ui.cpython-310.pyc ADDED
Binary file (342 Bytes). View file
 
app.py CHANGED
@@ -1,6 +1,4 @@
1
- from random import choices
2
  import gradio as gr
3
- import torch
4
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
5
  from ui import title, description
6
  from langs import LANGS
@@ -26,12 +24,6 @@ def translate(text, src_lang, tgt_lang, max_length=400):
26
  return result[0]['translation_text']
27
 
28
 
29
- translate_interface = gr.Interface(fn=translate,
30
- inputs=outputs="text",
31
- title=title,
32
- description=description)
33
-
34
-
35
  gr.Interface(
36
  translate,
37
  [
 
 
1
  import gradio as gr
 
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
3
  from ui import title, description
4
  from langs import LANGS
 
24
  return result[0]['translation_text']
25
 
26
 
 
 
 
 
 
 
27
  gr.Interface(
28
  translate,
29
  [
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
- https://github.com/huggingface/transformers/archive/nllb.zip
2
  gradio
3
  torch
 
1
+ transformers
2
  gradio
3
  torch