Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import reveal_slides as rs
|
|
|
3 |
|
4 |
# Initialize session state variables if they don't exist
|
5 |
if 'recap_period' not in st.session_state:
|
@@ -14,6 +15,12 @@ if 'selected_branches' not in st.session_state:
|
|
14 |
st.session_state['selected_branches'] = []
|
15 |
if 'selected_contributor' not in st.session_state:
|
16 |
st.session_state['selected_contributor'] = ''
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
markdown = r"""
|
19 |
# GitHub Recap: Repository
|
@@ -54,8 +61,11 @@ if st.session_state['repo_type'] == "private":
|
|
54 |
# Repository selection
|
55 |
st.session_state['reponame'] = st.text_input("hashicorp/terraform")
|
56 |
|
57 |
-
# Load button to fetch repo data (simulated with mock data)
|
58 |
if st.button("sync"):
|
|
|
|
|
|
|
|
|
59 |
st.session_state['selected_branches'] = mock_branches # Simulate fetching branches
|
60 |
st.session_state['selected_contributor'] = '' # Reset selected contributor
|
61 |
|
@@ -70,14 +80,19 @@ if st.button("sync"):
|
|
70 |
|
71 |
# Get recap button
|
72 |
if st.button("Get Recap"):
|
|
|
73 |
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
83 |
|
|
|
1 |
import streamlit as st
|
2 |
import reveal_slides as rs
|
3 |
+
import time
|
4 |
|
5 |
# Initialize session state variables if they don't exist
|
6 |
if 'recap_period' not in st.session_state:
|
|
|
15 |
st.session_state['selected_branches'] = []
|
16 |
if 'selected_contributor' not in st.session_state:
|
17 |
st.session_state['selected_contributor'] = ''
|
18 |
+
if 'selected_contributor' not in st.session_state:
|
19 |
+
st.session_state['selected_contributor'] = ''
|
20 |
+
if 'sync' not in st.session_state:
|
21 |
+
st.session_state['sync'] = False
|
22 |
+
if 'Recap' not in st.session_state:
|
23 |
+
st.session_state['Recap'] = False
|
24 |
|
25 |
markdown = r"""
|
26 |
# GitHub Recap: Repository
|
|
|
61 |
# Repository selection
|
62 |
st.session_state['reponame'] = st.text_input("hashicorp/terraform")
|
63 |
|
|
|
64 |
if st.button("sync"):
|
65 |
+
st.session_state['sync'] = True
|
66 |
+
# Load button to fetch repo data (simulated with mock data)
|
67 |
+
if st.session_state['sync']:
|
68 |
+
time.sleep(1)
|
69 |
st.session_state['selected_branches'] = mock_branches # Simulate fetching branches
|
70 |
st.session_state['selected_contributor'] = '' # Reset selected contributor
|
71 |
|
|
|
80 |
|
81 |
# Get recap button
|
82 |
if st.button("Get Recap"):
|
83 |
+
st.session_state['Recap'] = True
|
84 |
|
85 |
+
st.session_state['sync'] = False
|
86 |
+
|
87 |
+
if st.session_state['Recap']:
|
88 |
+
time.sleep(6)
|
89 |
+
# Placeholder for GitHub markdown content
|
90 |
+
rs.slides(markdown, height=500)
|
91 |
|
92 |
+
# Chat prompt (future feature)
|
93 |
+
st.text_input("Ask any question about the contributor:", on_change=None, key="chat_prompt")
|
94 |
+
|
95 |
+
if st.button("ask"):
|
96 |
+
st.write("Feature coming soon!")
|
97 |
|
98 |
|