Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Write a streamlit program in short number of lines that has four buttons on a sidebar also with a textbox labeled Github URL. Create python code that performs the four functions with github : Pull & Read, Append and Write, Create a file on github, Delete a file on github.
|
2 |
+
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
st.sidebar.title('GitHub Functions')
|
6 |
+
|
7 |
+
url = st.sidebar.text_input("GitHub URL")
|
8 |
+
|
9 |
+
if st.sidebar.button("Pull & Read"):
|
10 |
+
# code to pull & read
|
11 |
+
|
12 |
+
if st.sidebar.button("Append & Write"):
|
13 |
+
# code to append & write
|
14 |
+
|
15 |
+
if st.sidebar.button("Create File"):
|
16 |
+
# code to create a file
|
17 |
+
|
18 |
+
if st.sidebar.button("Delete File"):
|
19 |
+
# code to delete a file
|