-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathZ_multichat.py
More file actions
25 lines (18 loc) · 955 Bytes
/
Z_multichat.py
File metadata and controls
25 lines (18 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import streamlit as st
from Streamlit_Pages.config import Config
import os
from Streamlit_Pages.Streamlit_groq import page_one
from Streamlit_Pages.Streamlit_Ollama import page_two
from Streamlit_Pages.Streamlit_OpenAI import page_three
from Streamlit_Pages.Streamlit_Anthropic import page_four
st.set_page_config(page_icon="💬", layout="wide", page_title="Multi-Chat Bot")
# Initialize chat history and selected model
if "messages" not in st.session_state:
st.session_state.messages = []
if "selected_model" not in st.session_state:
st.session_state.selected_model = None
# Choose page
# pages = {'Groq API': page_one, 'Local with Ollama': page_two, 'OpenAI API': page_three, 'Anthropic API': page_four}
pages = {'OpenAI API': page_three, 'Groq API': page_one, 'Local with Ollama': page_two, 'Anthropic API': page_four}
selected_page = st.sidebar.selectbox("Choose the Model Provider:", options=list(pages.keys()))
pages[selected_page]()