ibrahimj commited on
Commit
1161aea
1 Parent(s): 9c820de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,8 +2,9 @@ import os
2
  import gradio as grad
3
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, TextStreamer
4
 
 
5
  model_c = 'nadsoft/faseeh.v.9'
6
- tokenizer = AutoTokenizer.from_pretrained(model_c,src_lang='ar_AR', tgt_lang='en_XX')
7
  model = AutoModelForSeq2SeqLM.from_pretrained(model_c,use_auth_token=auth_token)
8
  streamer = TextStreamer(tokenizer)
9
 
 
2
  import gradio as grad
3
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, TextStreamer
4
 
5
+ auth_token = os.environ.get("auth_token")
6
  model_c = 'nadsoft/faseeh.v.9'
7
+ tokenizer = AutoTokenizer.from_pretrained(model_c,src_lang='ar_AR', tgt_lang='en_XX',use_auth_token=auth_token)
8
  model = AutoModelForSeq2SeqLM.from_pretrained(model_c,use_auth_token=auth_token)
9
  streamer = TextStreamer(tokenizer)
10