vs4vijay commited on
Commit
f2cf984
1 Parent(s): f5c1383

refactoring

Browse files
Files changed (6) hide show
  1. .gitignore +0 -0
  2. README.md +1 -1
  3. app.py +0 -34
  4. data/.gitkeep +0 -0
  5. src/app.py +43 -0
  6. start.sh +1 -0
.gitignore ADDED
File without changes
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: blue
5
  colorTo: pink
6
  sdk: streamlit
7
  sdk_version: 1.21.0
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
  ---
 
5
  colorTo: pink
6
  sdk: streamlit
7
  sdk_version: 1.21.0
8
+ app_file: src/app.py
9
  pinned: false
10
  license: mit
11
  ---
app.py DELETED
@@ -1,34 +0,0 @@
1
- import streamlit as st
2
-
3
- # set page to wide
4
- st.set_page_config(layout="wide")
5
-
6
- st.header('ChatStudio')
7
-
8
- # Create sidebar with dropdown menu with content about the app
9
- with st.sidebar:
10
- st.subheader('ChatStudio')
11
- page = st.selectbox("Choose a context", [
12
- 'Wiki',
13
- 'Github',
14
- 'HuggingFace',
15
- ])
16
-
17
-
18
-
19
- # Create st.tabs
20
- tabs = st.tabs(
21
- [
22
- "Wiki",
23
- "Github",
24
- "HuggingFace",
25
- ]
26
- )
27
-
28
-
29
-
30
-
31
-
32
- x = st.slider('Select a value')
33
- st.write(x, 'squared is', x * x)
34
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/.gitkeep ADDED
File without changes
src/app.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # set page to wide
4
+ st.set_page_config(layout="wide")
5
+
6
+ st.header('ChatStudio')
7
+
8
+ def init():
9
+ if 'chats' not in st.session_state:
10
+ st.session_state.chats = {}
11
+
12
+ def main():
13
+ init()
14
+
15
+ # Create sidebar with dropdown menu with content about the app
16
+ with st.sidebar:
17
+ st.subheader('ChatStudio')
18
+ page = st.selectbox("Choose a context", [
19
+ 'Wiki',
20
+ 'Github',
21
+ 'HuggingFace',
22
+ ])
23
+
24
+ new_chat = st.button("New Chat", on_click=lambda: st.session_state.chats.update({page: ['N Chat']}))
25
+
26
+ uploaded_docs = st.file_uploader("Upload documents")
27
+
28
+ # Create st.tabs
29
+ tabs = st.tabs(
30
+ [
31
+ "Chat 1",
32
+ "Chat 2",
33
+ ]
34
+ )
35
+
36
+ if uploaded_docs:
37
+ st.write(uploaded_docs)
38
+
39
+ # Take user audio input from user
40
+
41
+
42
+ if __name__ == "__main__":
43
+ main()
start.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ streamlit run src/app.py