Ashrafb commited on
Commit
6e3dbf6
1 Parent(s): 30c9cd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -7,6 +7,9 @@ import time
7
  from queue import Queue
8
  from threading import Thread
9
 
 
 
 
10
  API_URL = "models/facebook/mbart-large-50-many-to-one-mmt"
11
  API_TOKEN = os.environ.get("HF_READ_TOKEN")
12
 
@@ -80,6 +83,8 @@ import random
80
  import time
81
 
82
  # ... (existing code)
 
 
83
 
84
  def get_prompts(prompt_text):
85
  if not prompt_text:
 
7
  from queue import Queue
8
  from threading import Thread
9
 
10
+
11
+
12
+
13
  API_URL = "models/facebook/mbart-large-50-many-to-one-mmt"
14
  API_TOKEN = os.environ.get("HF_READ_TOKEN")
15
 
 
83
  import time
84
 
85
  # ... (existing code)
86
+ model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50-many-to-one-mmt")
87
+ tokenizer = MBart50TokenizerFast
88
 
89
  def get_prompts(prompt_text):
90
  if not prompt_text: