Update app.py
Browse files
app.py
CHANGED
|
@@ -16,16 +16,16 @@ if recorded_audio:
|
|
| 16 |
|
| 17 |
|
| 18 |
if recorded_audio:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
messages = [
|
| 25 |
-
{"role": "user", "content": transcribed_text},
|
| 26 |
-
]
|
| 27 |
-
pipe2 = pipeline("text-generation", model="thtskaran/sanskritayam-gpt")
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
if recorded_audio:
|
| 19 |
+
out = pipe(audio_file)
|
| 20 |
+
st.json(out)
|
| 21 |
+
|
| 22 |
+
transcribed_text = out['text']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
messages = [
|
| 25 |
+
{"role": "user", "content": transcribed_text},
|
| 26 |
+
]
|
| 27 |
+
pipe2 = pipeline("text-generation", model="thtskaran/sanskritayam-gpt")
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
out2 = pipe2(messages)
|
| 31 |
+
st.write(out2)
|