Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,9 @@ url = st.text_input("Enter URL", "https://example.com")
|
|
| 43 |
if st.button("Run Bot") and not st.session_state.running:
|
| 44 |
st.session_state.logs.clear()
|
| 45 |
st.session_state.running = True
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
st.subheader("Logs")
|
|
|
|
| 43 |
if st.button("Run Bot") and not st.session_state.running:
|
| 44 |
st.session_state.logs.clear()
|
| 45 |
st.session_state.running = True
|
| 46 |
+
# Run in background
|
| 47 |
+
loop = asyncio.get_event_loop()
|
| 48 |
+
loop.create_task(run_bot(url))
|
| 49 |
|
| 50 |
|
| 51 |
st.subheader("Logs")
|