Ra-Is commited on
Commit
660fc7d
1 Parent(s): 6dbd92a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import requests
2
  import json
3
  import gradio as gr
 
4
 
5
  # Define the function to call the API
6
  def translate(text):
7
- url = "https://xayq0bvi0h.execute-api.eu-west-2.amazonaws.com/api/translate"
 
8
  payload = json.dumps({
9
  "text": text
10
  })
 
1
  import requests
2
  import json
3
  import gradio as gr
4
+ import os
5
 
6
  # Define the function to call the API
7
  def translate(text):
8
+ url = os.getenv("TRANSLATION_API_URL")
9
+ #url = "https://xayq0bvi0h.execute-api.eu-west-2.amazonaws.com/api/translate"
10
  payload = json.dumps({
11
  "text": text
12
  })