Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,17 +39,6 @@ def process_input(urls, question):
|
|
39 |
)
|
40 |
return after_rag_chain.invoke(question)
|
41 |
|
42 |
-
import pyttsx3
|
43 |
-
engine = pyttsx3.init('sapi5')
|
44 |
-
voices = engine.getProperty('voices')
|
45 |
-
# print(voices[1].id)
|
46 |
-
engine.setProperty('voice', voices[0].id)
|
47 |
-
|
48 |
-
|
49 |
-
def speak(audio):
|
50 |
-
engine.say(audio)
|
51 |
-
engine.runAndWait()
|
52 |
-
|
53 |
|
54 |
# Define Gradio interface
|
55 |
iface = gr.Interface(fn=process_input,
|
|
|
39 |
)
|
40 |
return after_rag_chain.invoke(question)
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
# Define Gradio interface
|
44 |
iface = gr.Interface(fn=process_input,
|