andreska commited on
Commit
971e656
·
1 Parent(s): b7b48c0

CODEFIX: Made code possible to run locally. Fixed issue where stopping AI generation would result in blank screen.

Browse files
Files changed (5) hide show
  1. .env +1 -0
  2. .gitignore +2 -0
  3. .vscode/launch.json +14 -0
  4. app.py +1 -1
  5. requirements.txt +2 -1
.env ADDED
@@ -0,0 +1 @@
 
 
1
+ HF_TOKEN=my_token
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ AdregaAiChat61_Environment/
2
+ .env
.vscode/launch.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Streamlit",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "module": "streamlit",
9
+ "args": ["run", "app.py"],
10
+ "env": { "PYTHONPATH": "${workspaceFolder}" },
11
+ "console": "integratedTerminal"
12
+ }
13
+ ]
14
+ }
app.py CHANGED
@@ -44,7 +44,7 @@ st.markdown(
44
 
45
  placeholder = st.empty()
46
  # Define the placeholder globally (outside columns)
47
- if st.session_state and st.session_state.conversation:
48
  placeholder.markdown(f'<div class="scrollable-div">{st.session_state.conversation}</div>', unsafe_allow_html=True)
49
  else:
50
  placeholder.markdown(f'<div class="scrollable-div"><p>Welcome! I am your Adrega AI assistant</p></div>', unsafe_allow_html=True)
 
44
 
45
  placeholder = st.empty()
46
  # Define the placeholder globally (outside columns)
47
+ if st.session_state and 'conversation' in st.session_state:
48
  placeholder.markdown(f'<div class="scrollable-div">{st.session_state.conversation}</div>', unsafe_allow_html=True)
49
  else:
50
  placeholder.markdown(f'<div class="scrollable-div"><p>Welcome! I am your Adrega AI assistant</p></div>', unsafe_allow_html=True)
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  streamlit==1.11.0
2
  huggingface_hub
3
- datasets
 
 
1
  streamlit==1.11.0
2
  huggingface_hub
3
+ datasets
4
+ altair<5