Update requirements.txt with updated libraries. Modify prompt for translation and grade level.
Browse files- app.py +3 -3
- requirements.txt +4 -4
app.py
CHANGED
|
@@ -177,12 +177,12 @@ def transform_text(desc, express_chain, num_words, formality,
|
|
| 177 |
|
| 178 |
lang_level_str = ""
|
| 179 |
if lang_level != LANG_LEVEL_DEFAULT:
|
| 180 |
-
lang_level_str = "at a " + lang_level + "
|
| 181 |
|
| 182 |
translate_to_str = ""
|
| 183 |
if translate_to != TRANSLATE_TO_DEFAULT:
|
| 184 |
-
translate_to_str = "translated to " + (
|
| 185 |
-
"" if lang_level == TRANSLATE_TO_DEFAULT else
|
| 186 |
|
| 187 |
literary_style_str = ""
|
| 188 |
if literary_style != LITERARY_STYLE_DEFAULT:
|
|
|
|
| 177 |
|
| 178 |
lang_level_str = ""
|
| 179 |
if lang_level != LANG_LEVEL_DEFAULT:
|
| 180 |
+
lang_level_str = "at a level that a person in " + lang_level + " can easily comprehend, " if translate_to == TRANSLATE_TO_DEFAULT else ""
|
| 181 |
|
| 182 |
translate_to_str = ""
|
| 183 |
if translate_to != TRANSLATE_TO_DEFAULT:
|
| 184 |
+
translate_to_str = "translated to " + translate_to + (
|
| 185 |
+
"" if lang_level == TRANSLATE_TO_DEFAULT else " at a level that a person in " + lang_level + " can easily comprehend") + ", "
|
| 186 |
|
| 187 |
literary_style_str = ""
|
| 188 |
if literary_style != LITERARY_STYLE_DEFAULT:
|
requirements.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
openai==0.
|
| 2 |
gradio==3.19.1
|
| 3 |
google-search-results
|
| 4 |
-
google-api-python-client==2.
|
| 5 |
wolframalpha
|
| 6 |
-
langchain==0.0.
|
| 7 |
requests==2.28.2
|
| 8 |
git+https://github.com/openai/whisper.git
|
| 9 |
-
boto3==1.26.
|
| 10 |
faiss-cpu
|
|
|
|
| 1 |
+
openai==0.27.0
|
| 2 |
gradio==3.19.1
|
| 3 |
google-search-results
|
| 4 |
+
google-api-python-client==2.80.0
|
| 5 |
wolframalpha
|
| 6 |
+
langchain==0.0.98
|
| 7 |
requests==2.28.2
|
| 8 |
git+https://github.com/openai/whisper.git
|
| 9 |
+
boto3==1.26.82
|
| 10 |
faiss-cpu
|