prodosmate / app.py
Ihor Neporozhnii
Deploy with cached graph_generator, predictor, plotter
459aa21
raw
history blame contribute delete
679 Bytes
import os
import shutil
from git import Repo
import streamlit as st
st.set_page_config(layout="wide")
@st.cache_resource
def load_repo():
if os.path.exists(os.path.dirname(os.path.abspath(__file__))+"/prodosmate/prodosmate_app_repo"):
shutil.rmtree(os.path.dirname(os.path.abspath(__file__))+"/prodosmate/prodosmate_app_repo")
print("Cloning...")
Repo.clone_from(f"https://ineporozhnii:{os.environ['PDOS_FINGERPRINTS_APP_TOKEN']}@github.com/ineporozhnii/pdos_fingerprints_app_hugging_face.git", "prodosmate/prodosmate_app_repo")
print("Finished cloning")
load_repo()
from prodosmate.prodosmate_app_repo.main import run_application
run_application()