BounharAbdelaziz commited on
Commit
8b6ba6f
β€’
1 Parent(s): 1e119e9

use latest model

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import requests
3
  import os
4
 
5
- API_URL = "https://api-inference.huggingface.co/models/atlasia/Terjman-Large-v2"
6
  HF_TOKEN = os.environ['HF_TOKEN']
7
  headers = {"Authorization": "Bearer "+ HF_TOKEN}
8
 
@@ -13,7 +13,7 @@ def respond(english_text):
13
  darija_translated_text = requests.post(API_URL, headers=headers, json=payload)
14
  return darija_translated_text.json()[0]["generated_text"]
15
 
16
- app = gr.Interface(fn=respond, inputs="text", outputs="text", title="Terjman-Large-v2 πŸ‘¨β€πŸ’»πŸ₯°", description="Translate English text to Moroccan Darija using our Large model (240M) πŸ€—")
17
 
18
  if __name__ == "__main__":
19
  app.launch()
 
2
  import requests
3
  import os
4
 
5
+ API_URL = "https://api-inference.huggingface.co/models/BounharAbdelaziz/Terjman-Large-v2"
6
  HF_TOKEN = os.environ['HF_TOKEN']
7
  headers = {"Authorization": "Bearer "+ HF_TOKEN}
8
 
 
13
  darija_translated_text = requests.post(API_URL, headers=headers, json=payload)
14
  return darija_translated_text.json()[0]["generated_text"]
15
 
16
+ app = gr.Interface(fn=respond, inputs="text", outputs="text", title="Terjman-Large πŸ‘¨β€πŸ’»πŸ₯°", description="Translate English text to Moroccan Darija using our Large model (240M) πŸ€—")
17
 
18
  if __name__ == "__main__":
19
  app.launch()