NCTCMumbai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -195,6 +195,7 @@ def translate_text(selected_language,history):
|
|
195 |
|
196 |
to_code = iso_language_codes[selected_language]
|
197 |
response_text = history[-1][1] if history else ''
|
|
|
198 |
translation = bhashini_translate(response_text, to_code=to_code)
|
199 |
return translation['translated_content']
|
200 |
|
@@ -252,7 +253,7 @@ with gr.Blocks(theme='gradio/soft') as CHATBOT:
|
|
252 |
# Call bot function
|
253 |
bot_output = list(bot(history, cross_encoder))
|
254 |
history, prompt_html = bot_output[-1]
|
255 |
-
|
256 |
# Update the history state
|
257 |
history_state[:] = history
|
258 |
|
|
|
195 |
|
196 |
to_code = iso_language_codes[selected_language]
|
197 |
response_text = history[-1][1] if history else ''
|
198 |
+
print('response_text for translation',response_text)
|
199 |
translation = bhashini_translate(response_text, to_code=to_code)
|
200 |
return translation['translated_content']
|
201 |
|
|
|
253 |
# Call bot function
|
254 |
bot_output = list(bot(history, cross_encoder))
|
255 |
history, prompt_html = bot_output[-1]
|
256 |
+
print('History',history)
|
257 |
# Update the history state
|
258 |
history_state[:] = history
|
259 |
|