Spaces:
Sleeping
Sleeping
APPLE commited on
Commit ·
4cafb76
1
Parent(s): 4278cf0
poetry
Browse files
app.py
CHANGED
|
@@ -1,4 +1,29 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
st.write(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import os
|
| 3 |
|
| 4 |
+
def clone_repo(repo_url):
|
| 5 |
+
st.write("Cloning the repository...")
|
| 6 |
+
os.system(f"git clone {repo_url}")
|
| 7 |
+
|
| 8 |
+
def install_dependencies():
|
| 9 |
+
st.write("Installing dependencies using Poetry...")
|
| 10 |
+
os.chdir("form16-parser")
|
| 11 |
+
os.system("poetry install")
|
| 12 |
+
|
| 13 |
+
def main():
|
| 14 |
+
st.title("GitHub Repo Cloner and Dependency Installer")
|
| 15 |
+
|
| 16 |
+
# Input field for user to enter GitHub repository URL
|
| 17 |
+
repo_url = st.text_input("Enter GitHub Repository URL:", "https://github.com/INF800/form16-parser")
|
| 18 |
+
|
| 19 |
+
# Button to trigger cloning and dependency installation
|
| 20 |
+
if st.button("Clone Repo and Install Dependencies"):
|
| 21 |
+
clone_repo(repo_url)
|
| 22 |
+
install_dependencies()
|
| 23 |
+
st.write("Dependencies installed successfully!")
|
| 24 |
+
|
| 25 |
+
from form16_parser import build_parser
|
| 26 |
+
st.write(f"{build_parser}")
|
| 27 |
+
|
| 28 |
+
if __name__ == "__main__":
|
| 29 |
+
main()
|