Skip to content

Commit

Permalink
Merge pull request #48 from DevOps2025Group1/folder_structure_update
Browse files Browse the repository at this point in the history
Updated structure
  • Loading branch information
Timmy1012 authored Feb 26, 2025
2 parents 2064170 + 168d6ab commit be0a6a3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ headless = true

[browser]
gatherUsageStats = false

[client]
showSidebarNavigation = false
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ COPY . /usr/src/app
EXPOSE 80

ENTRYPOINT ["streamlit", "run"]
CMD ["chatbot.py"]
CMD ["app.py"]
17 changes: 17 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import dotenv
from pages.chatbot import OpenAIChatbot
import streamlit as st


if __name__ == "__main__":
dotenv.load_dotenv()

st.sidebar.page_link('app.py', label='Chatbot')

#Hide this later :)
st.sidebar.page_link('pages/login.py', label='Login')
st.sidebar.page_link('pages/profile.py', label='Profile')

chatbot = OpenAIChatbot()
chatbot.run()
Empty file added pages/__init__.py
Empty file.
8 changes: 0 additions & 8 deletions chatbot.py → pages/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""

import streamlit as st
import dotenv
from clients.search_client import AzureSearchClient
from clients.openai_client import OpenAIClient

Expand Down Expand Up @@ -66,10 +65,3 @@ def process_input(self, prompt: str):
msg = self.openai_client.generate_response(messages_with_context)
st.session_state.messages.append({"role": "assistant", "content": msg})
st.chat_message("assistant").write(msg)


if __name__ == "__main__":
dotenv.load_dotenv()

chatbot = OpenAIChatbot()
chatbot.run()

0 comments on commit be0a6a3

Please sign in to comment.