Spaces:
Runtime error
Runtime error
tonic
commited on
Commit
·
0c927b6
1
Parent(s):
682564f
fix the choices list
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ load_dotenv()
|
|
| 23 |
COHERE_API_KEY = os.getenv('CO_API_KEY')
|
| 24 |
SEAMLESSM4T = os.getenv('SEAMLESSM4T')
|
| 25 |
df = pd.read_csv("lang_list.csv")
|
| 26 |
-
|
| 27 |
inputlanguage = ""
|
| 28 |
producetext = "\n\nProduce a complete expositional blog post in {target_language} based on the above :"
|
| 29 |
formatinputstring = "\n\nthe above text is a learning aid. you must use rich text format to rewrite the above and add 1 . a red color tags for nouns 2. a blue color tag for verbs 3. a green color tag for adjectives and adverbs:"
|
|
@@ -179,8 +179,8 @@ def main():
|
|
| 179 |
gr.Markdown(description)
|
| 180 |
|
| 181 |
with gr.Row():
|
| 182 |
-
input_language = gr.Dropdown(choices=
|
| 183 |
-
target_language = gr.Dropdown(choices=
|
| 184 |
|
| 185 |
with gr.Accordion("Talk To 🌟AyaTonic"):
|
| 186 |
with gr.Tab("🤙🏻Audio & Text"):
|
|
|
|
| 23 |
COHERE_API_KEY = os.getenv('CO_API_KEY')
|
| 24 |
SEAMLESSM4T = os.getenv('SEAMLESSM4T')
|
| 25 |
df = pd.read_csv("lang_list.csv")
|
| 26 |
+
choices = df["name"].to_list()
|
| 27 |
inputlanguage = ""
|
| 28 |
producetext = "\n\nProduce a complete expositional blog post in {target_language} based on the above :"
|
| 29 |
formatinputstring = "\n\nthe above text is a learning aid. you must use rich text format to rewrite the above and add 1 . a red color tags for nouns 2. a blue color tag for verbs 3. a green color tag for adjectives and adverbs:"
|
|
|
|
| 179 |
gr.Markdown(description)
|
| 180 |
|
| 181 |
with gr.Row():
|
| 182 |
+
input_language = gr.Dropdown(choices=choices, label="Your Native Language")
|
| 183 |
+
target_language = gr.Dropdown(choices=choices, label="Language To Learn")
|
| 184 |
|
| 185 |
with gr.Accordion("Talk To 🌟AyaTonic"):
|
| 186 |
with gr.Tab("🤙🏻Audio & Text"):
|