Spaces:
Runtime error
Runtime error
Commit
·
c5cb1c8
1
Parent(s):
36aac0a
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from git import Repo
|
2 |
+
import os
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
st.set_page_config(
|
6 |
+
page_title="TRACING INSIGHTS",
|
7 |
+
page_icon=None,
|
8 |
+
layout="wide",
|
9 |
+
initial_sidebar_state="expanded",
|
10 |
+
# menu_items={
|
11 |
+
# 'Get Help': 'https://www.extremelycoolapp.com/help',
|
12 |
+
# 'Report a bug': "https://www.extremelycoolapp.com/bug",
|
13 |
+
# 'About': "# This is a header. This is an *extremely* cool app!"
|
14 |
+
# }
|
15 |
+
)
|
16 |
+
|
17 |
+
GITHUB_PAT = os.environ['GITHUB']
|
18 |
+
api_key = os.environ['api_key']
|
19 |
+
secret_api_key = os.environ['secret_api_key']
|
20 |
+
access_token = os.environ['access_token']
|
21 |
+
secret_access_token = os.environ['secret_access_token']
|
22 |
+
|
23 |
+
if not os.path.exists('repo_directory'):
|
24 |
+
Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/translator.git', 'repo_directory' )
|
25 |
+
|
26 |
+
from repo_directory import translator
|
27 |
+
translator.auth(api_key,secret_api_key,access_token,secret_access_token)
|