Spaces:
Sleeping
Sleeping
N.Achyuth Reddy
commited on
Commit
Β·
7681a13
1
Parent(s):
27e28a2
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from st_audiorec import st_audiorec
|
|
7 |
TITLE = "AgriTure"
|
8 |
DESCRIPTION = """
|
9 |
-------------------
|
10 |
-
This Project demonstrates a model fine-tuned by Achyuth. This Model is named as "AgriTure". This Model helps the farmers and scientists to develop the art of agriculture and farming.
|
11 |
Hope this will be a Successful Project!!!
|
12 |
~Achyuth
|
13 |
-------------------
|
@@ -70,17 +70,17 @@ for message in st.session_state.messages:
|
|
70 |
with st.chat_message(message["role"], avatar=("π§βπ»" if message["role"] == 'human' else 'π¦')):
|
71 |
st.markdown(message["content"])
|
72 |
|
73 |
-
textinput = st.chat_input("Ask
|
74 |
wav_audio_data = st_audiorec()
|
75 |
|
76 |
if wav_audio_data != None:
|
77 |
-
with st.status("Transcribing audio"):
|
78 |
# save audio
|
79 |
with open("audio.wav", "wb") as f:
|
80 |
f.write(wav_audio_data)
|
81 |
prompt = transcribe("audio.wav")
|
82 |
|
83 |
-
st.write("Transcribed Given Audio")
|
84 |
|
85 |
st.chat_message("human",avatar = "π§βπ»").markdown(prompt)
|
86 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
|
|
7 |
TITLE = "AgriTure"
|
8 |
DESCRIPTION = """
|
9 |
-------------------
|
10 |
+
This Project demonstrates a model fine-tuned by Achyuth. This Model is named as "AgriTure". This Model helps the farmers and scientists to develop the art of agriculture and farming.
|
11 |
Hope this will be a Successful Project!!!
|
12 |
~Achyuth
|
13 |
-------------------
|
|
|
70 |
with st.chat_message(message["role"], avatar=("π§βπ»" if message["role"] == 'human' else 'π¦')):
|
71 |
st.markdown(message["content"])
|
72 |
|
73 |
+
textinput = st.chat_input("Ask AgriTure anything...")
|
74 |
wav_audio_data = st_audiorec()
|
75 |
|
76 |
if wav_audio_data != None:
|
77 |
+
with st.status("Transcribing audio..."):
|
78 |
# save audio
|
79 |
with open("audio.wav", "wb") as f:
|
80 |
f.write(wav_audio_data)
|
81 |
prompt = transcribe("audio.wav")
|
82 |
|
83 |
+
st.write("Transcribed Given Audio β")
|
84 |
|
85 |
st.chat_message("human",avatar = "π§βπ»").markdown(prompt)
|
86 |
st.session_state.messages.append({"role": "human", "content": prompt})
|