Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,17 +117,19 @@ def conversation_predict(input_text):
|
|
| 117 |
def ai_predicted(user_input):
|
| 118 |
user_input = translate_Singlish_to_sinhala(user_input)
|
| 119 |
user_input = transliterate_to_sinhala(user_input)
|
|
|
|
| 120 |
user_input = translate_sinhala_to_english(user_input)
|
| 121 |
-
print("You(
|
| 122 |
|
| 123 |
# Get AI response
|
| 124 |
ai_response = conversation_predict(user_input)
|
| 125 |
|
| 126 |
# Split the AI response into separate lines
|
| 127 |
# ai_response_lines = ai_response.split("</s>")
|
| 128 |
-
print("AI(English):", ai_response,"\n")
|
| 129 |
|
| 130 |
response = translate_english_to_sinhala(ai_response)
|
|
|
|
| 131 |
response = transliterate_from_sinhala(response)
|
| 132 |
print(response)
|
| 133 |
|
|
|
|
| 117 |
def ai_predicted(user_input):
|
| 118 |
user_input = translate_Singlish_to_sinhala(user_input)
|
| 119 |
user_input = transliterate_to_sinhala(user_input)
|
| 120 |
+
print("You(Sinhala): ", user_input,"\n")
|
| 121 |
user_input = translate_sinhala_to_english(user_input)
|
| 122 |
+
print("You(English): ", user_input,"\n")
|
| 123 |
|
| 124 |
# Get AI response
|
| 125 |
ai_response = conversation_predict(user_input)
|
| 126 |
|
| 127 |
# Split the AI response into separate lines
|
| 128 |
# ai_response_lines = ai_response.split("</s>")
|
| 129 |
+
print("AI(English): ", ai_response,"\n")
|
| 130 |
|
| 131 |
response = translate_english_to_sinhala(ai_response)
|
| 132 |
+
print("AI(Sinhala): ", response,"\n")
|
| 133 |
response = transliterate_from_sinhala(response)
|
| 134 |
print(response)
|
| 135 |
|