Spaces:
Sleeping
Sleeping
CaesarCloudSync
commited on
Commit
•
d271195
1
Parent(s):
409c4ed
CaesarFinance setup code implemented
Browse files- CaesarFinance/caesarfinance.py +3 -3
- main.py +19 -18
CaesarFinance/caesarfinance.py
CHANGED
@@ -34,9 +34,9 @@ if __name__ == "__main__":
|
|
34 |
while access_code_bool == False:
|
35 |
access_code_bool = caesarfinance.create_access_code()
|
36 |
|
37 |
-
code = caesarfinance.fetch_access_code()
|
38 |
-
access_token = caesarfinance.get_access_token(code)
|
39 |
-
print(access_token)
|
40 |
|
41 |
|
42 |
#caesarfinance.get_access_code()
|
|
|
34 |
while access_code_bool == False:
|
35 |
access_code_bool = caesarfinance.create_access_code()
|
36 |
|
37 |
+
#code = caesarfinance.fetch_access_code()
|
38 |
+
#access_token = caesarfinance.get_access_token(code)
|
39 |
+
#print(access_token)
|
40 |
|
41 |
|
42 |
#caesarfinance.get_access_code()
|
main.py
CHANGED
@@ -54,24 +54,25 @@ def caesaraihome():
|
|
54 |
@app.get("/caesarailogo")
|
55 |
def caesarailogo():
|
56 |
return FileResponse(f"{CURRENT_DIR}/CaesarAILogo.png")
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
f.
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
75 |
|
76 |
@app.websocket("/caesarobjectdetectws")
|
77 |
async def caesarobjectdetectws(websocket: WebSocket):
|
|
|
54 |
@app.get("/caesarailogo")
|
55 |
def caesarailogo():
|
56 |
return FileResponse(f"{CURRENT_DIR}/CaesarAILogo.png")
|
57 |
+
|
58 |
+
#@app.get("/caesaraisavecode")
|
59 |
+
#def caesaraisavecode(code: Union[str,None]):
|
60 |
+
# if code != None:
|
61 |
+
# with open(f"{CURRENT_DIR}/CaesarFinance/current_code.txt","w+") as f:
|
62 |
+
# f.write(code)
|
63 |
+
# return {"message":"Temporary fetching code stored."}
|
64 |
+
# elif code== None:
|
65 |
+
# return {"message":"code doesn't exist."}
|
66 |
+
#@app.get("/caesaraigetcode")
|
67 |
+
#def caesaraigetcode():
|
68 |
+
# if "current_code.txt" in os.listdir(f"{CURRENT_DIR}/CaesarFinance"):
|
69 |
+
# f = open(f"{CURRENT_DIR}/CaesarFinance/current_code.txt","r")
|
70 |
+
# code = f.read()
|
71 |
+
# f.close()
|
72 |
+
# os.remove(f"{CURRENT_DIR}/CaesarFinance/current_code.txt")
|
73 |
+
# return {"messagecode":code}
|
74 |
+
# elif "current_code.txt" not in os.listdir(f"{CURRENT_DIR}/CaesarFinance"):
|
75 |
+
# return {"message":"temporary code doesn't exist. Please authenticate"}
|
76 |
|
77 |
@app.websocket("/caesarobjectdetectws")
|
78 |
async def caesarobjectdetectws(websocket: WebSocket):
|