Skip to content

Commit

Permalink
Fix first launch streamlit to load backend correctly (Josh-XT#656)
Browse files Browse the repository at this point in the history
* Add files via upload

Signed-off-by: Green Gecko <[email protected]>

* Fix backend load upon loading 

Signed-off-by: Green Gecko <[email protected]>

* Format

Signed-off-by: Green Gecko <[email protected]>

* Add version for autorefresh

Signed-off-by: Green Gecko <[email protected]>

---------

Signed-off-by: Green Gecko <[email protected]>
  • Loading branch information
birdup000 authored Jun 10, 2023
1 parent 3fb812e commit fb903ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ semantic-kernel==0.2.9.dev0
python-dotenv==1.0.0
ffmpeg==1.4
-e git+https://github.com/xtekky/gpt4free.git@6598265e2bf46ce1054736cd64db9ff42a358331#egg=gpt4free
streamlit-autorefresh==0.0.1
11 changes: 9 additions & 2 deletions streamlit/Main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Main.py
import streamlit as st
from components.verify_backend import verify_backend
from components.docs import agixt_docs
from streamlit_autorefresh import st_autorefresh


# Run the autorefresh about (5 seconds) and stop running in the corner after the 2nd time
count = st_autorefresh(interval=5000, limit=2)

verify_backend()

try:
with open("./.streamlit/config.toml") as f:
Expand Down Expand Up @@ -37,3 +40,7 @@
""",
unsafe_allow_html=True,
)


if not verify_backend():
verify_backend()

0 comments on commit fb903ab

Please sign in to comment.