Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
import torch
|
@@ -5,7 +8,10 @@ from gtts import gTTS
|
|
5 |
import io
|
6 |
import time
|
7 |
from streamlit.components.v1 import html
|
8 |
-
|
|
|
|
|
|
|
9 |
# Initialize session state
|
10 |
if 'processed_data' not in st.session_state:
|
11 |
st.session_state.processed_data = {
|
|
|
1 |
+
import nest_asyncio
|
2 |
+
nest_asyncio.apply()
|
3 |
+
|
4 |
import streamlit as st
|
5 |
from transformers import pipeline
|
6 |
import torch
|
|
|
8 |
import io
|
9 |
import time
|
10 |
from streamlit.components.v1 import html
|
11 |
+
import asyncio
|
12 |
+
if not asyncio.get_event_loop().is_running():
|
13 |
+
asyncio.set_event_loop(asyncio.new_event_loop())
|
14 |
+
|
15 |
# Initialize session state
|
16 |
if 'processed_data' not in st.session_state:
|
17 |
st.session_state.processed_data = {
|