Bofandra commited on
Commit
3fb3937
1 Parent(s): cb8fe28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -130,13 +130,16 @@ def respond(message,
130
  token = message.choices[0].delta.content
131
  response += token
132
  if(len(response)>0):
133
- yield response
134
- """"
135
  translated = translator.translate(response, src='en', dest=message_language)
136
  if not (translated is None):
137
  translated_response = translated.text
138
  yield translated_response
139
- """
 
 
 
 
 
140
  except Exception as error:
141
  print("An error occurred:", error)
142
  yield response
 
130
  token = message.choices[0].delta.content
131
  response += token
132
  if(len(response)>0):
 
 
133
  translated = translator.translate(response, src='en', dest=message_language)
134
  if not (translated is None):
135
  translated_response = translated.text
136
  yield translated_response
137
+ else:
138
+ yield response
139
+ else:
140
+ yield response
141
+ else:
142
+ yield response
143
  except Exception as error:
144
  print("An error occurred:", error)
145
  yield response