huseinzol05 commited on
Commit
27e119d
1 Parent(s): 349bdff
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -99,7 +99,7 @@ def translate(text, model_name, to_lang):
99
  json=json_data,
100
  )
101
  if response.status_code != 200:
102
- raise gradio.Error('API error.', duration=5)
103
 
104
  t = response.json()['result']
105
  return t
 
99
  json=json_data,
100
  )
101
  if response.status_code != 200:
102
+ raise gr.Error('API error.')
103
 
104
  t = response.json()['result']
105
  return t