Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,11 +11,13 @@ os.environ["OPENAI_API_KEY"] = os.getenv("k1")
|
|
| 11 |
|
| 12 |
st.markdown("Translation Application")
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
st.selectbox("Input Langauge: ",
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
text = st.text_input("Text Input: ")
|
| 21 |
|
|
@@ -28,7 +30,7 @@ if st.button("Submit"):
|
|
| 28 |
|
| 29 |
chain = prompt|llm
|
| 30 |
|
| 31 |
-
re = chain.invoke({"il":
|
| 32 |
|
| 33 |
st.write(re.content)
|
| 34 |
|
|
|
|
| 11 |
|
| 12 |
st.markdown("Translation Application")
|
| 13 |
|
| 14 |
+
options1 = ["English","Telugu","Hindi"]
|
| 15 |
|
| 16 |
+
st.selectbox("Input Langauge: ",options1)
|
| 17 |
|
| 18 |
+
options2 = ["Hindi","Telugu","English"]
|
| 19 |
+
|
| 20 |
+
st.selectbox("Output langauge: ",options2)
|
| 21 |
|
| 22 |
text = st.text_input("Text Input: ")
|
| 23 |
|
|
|
|
| 30 |
|
| 31 |
chain = prompt|llm
|
| 32 |
|
| 33 |
+
re = chain.invoke({"il":options1,"ol":options2, "i":text})
|
| 34 |
|
| 35 |
st.write(re.content)
|
| 36 |
|