Skip to content

Commit

Permalink
Merge branch 'CaffeineCrew:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthSai7 authored Sep 30, 2023
2 parents aafbb90 + 64c74ea commit d7dd4fe
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bin.* filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs dif
*.zip filter=lfs diff=lfs merge=lfs -text
*.zstandard filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
git lfs track *.jpg
git lfs track *.png
5 changes: 5 additions & 0 deletions TechdocsAPI/backend/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
allow_headers=["*"],
)


@app.get("/", tags=["Home"])
def api_home():
return {'detail': 'Welcome to Techdocs API'}

@app.get("/api/response_check", tags=["Resource Server"])
def api_response_check():
print("api_response_check")
Expand Down
2 changes: 1 addition & 1 deletion frontend/Login.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def auth_page():

base_url = 'http://localhost:8000'
base_url = 'https://caffeinecrew-techdocs.hf.space'


headers={"accept":"application/json"}
Expand Down
6 changes: 3 additions & 3 deletions frontend/pages/Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def instructions():
if st.button("Generate API KEY"):
with st.spinner("Generating API Key..."):
try:
base_url = "http://localhost:8000"
base_url = "https://caffeinecrew-techdocs.hf.space"
headers={"accept":"application/json", "Authorization": f"Bearer {st.session_state.access_token}"}
response = requests.put(url=base_url + "/auth/regenerate_api_key", headers=headers, data=json.dumps({"username":st.session_state.username}))
if (response.status_code!=200):
Expand All @@ -73,7 +73,7 @@ def instructions():


def code_page():
base_url = 'http://localhost:8000'
base_url = 'https://caffeinecrew-techdocs.hf.space'

def query_post(url, headers, data=None, params=None):
response = requests.post(url, data=data, headers=headers, params=params)
Expand Down Expand Up @@ -107,4 +107,4 @@ def query_post(url, headers, data=None, params=None):
st.session_state.runpage = auth_page
else:
st.session_state.runpage = code_page
st.session_state.runpage()
st.session_state.runpage()

0 comments on commit d7dd4fe

Please sign in to comment.