Spaces:
Sleeping
Sleeping
palondomus
commited on
Commit
•
1438a5c
1
Parent(s):
1669617
test gpu
Browse files- CaesarAIART/__pycache__/caesaraiart.cpython-39.pyc +0 -0
- CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc +0 -0
- CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc +0 -0
- CaesarHandwriting/__pycache__/caesarhandwriting.cpython-39.pyc +0 -0
- CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc +0 -0
- CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc +0 -0
- __pycache__/CaesarDetectEntity.cpython-39.pyc +0 -0
- __pycache__/CaesarTranslate.cpython-39.pyc +0 -0
- __pycache__/CaesarVoice.cpython-39.pyc +0 -0
- __pycache__/RequestModels.cpython-39.pyc +0 -0
- __pycache__/csv_to_db.cpython-39.pyc +0 -0
- __pycache__/main.cpython-39.pyc +0 -0
- build_app.sh +3 -0
- main.py +10 -2
- run_app.sh +2 -0
CaesarAIART/__pycache__/caesaraiart.cpython-39.pyc
CHANGED
Binary files a/CaesarAIART/__pycache__/caesaraiart.cpython-39.pyc and b/CaesarAIART/__pycache__/caesaraiart.cpython-39.pyc differ
|
|
CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc
CHANGED
Binary files a/CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc and b/CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc differ
|
|
CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc
CHANGED
Binary files a/CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc and b/CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc differ
|
|
CaesarHandwriting/__pycache__/caesarhandwriting.cpython-39.pyc
ADDED
Binary file (1.11 kB). View file
|
|
CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc
CHANGED
Binary files a/CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc and b/CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc differ
|
|
CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc
CHANGED
Binary files a/CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc and b/CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc differ
|
|
__pycache__/CaesarDetectEntity.cpython-39.pyc
CHANGED
Binary files a/__pycache__/CaesarDetectEntity.cpython-39.pyc and b/__pycache__/CaesarDetectEntity.cpython-39.pyc differ
|
|
__pycache__/CaesarTranslate.cpython-39.pyc
CHANGED
Binary files a/__pycache__/CaesarTranslate.cpython-39.pyc and b/__pycache__/CaesarTranslate.cpython-39.pyc differ
|
|
__pycache__/CaesarVoice.cpython-39.pyc
CHANGED
Binary files a/__pycache__/CaesarVoice.cpython-39.pyc and b/__pycache__/CaesarVoice.cpython-39.pyc differ
|
|
__pycache__/RequestModels.cpython-39.pyc
CHANGED
Binary files a/__pycache__/RequestModels.cpython-39.pyc and b/__pycache__/RequestModels.cpython-39.pyc differ
|
|
__pycache__/csv_to_db.cpython-39.pyc
CHANGED
Binary files a/__pycache__/csv_to_db.cpython-39.pyc and b/__pycache__/csv_to_db.cpython-39.pyc differ
|
|
__pycache__/main.cpython-39.pyc
CHANGED
Binary files a/__pycache__/main.cpython-39.pyc and b/__pycache__/main.cpython-39.pyc differ
|
|
build_app.sh
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
|
2 |
+
docker build -t palondomus/caesaraiapis:latest .
|
3 |
+
docker run -u $(id -u):$(id -g) --gpus all -p $1:$1 -it --rm palondomus/caesaraiapis:latest
|
main.py
CHANGED
@@ -6,7 +6,8 @@ import os
|
|
6 |
import shutil
|
7 |
import subprocess
|
8 |
import time
|
9 |
-
|
|
|
10 |
import cv2
|
11 |
import numpy as np
|
12 |
import pandas_datareader as pdr
|
@@ -53,6 +54,12 @@ pytesseract.pytesseract.tesseract_cmd = '/usr/bin/tesseract'
|
|
53 |
@app.get("/")
|
54 |
def caesaraihome():
|
55 |
return "Welcome to CaesarAI's API's and CaesarAINL."
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
@app.get("/caesarailogo")
|
57 |
def caesarailogo():
|
58 |
return FileResponse(f"{CURRENT_DIR}/CaesarAILogo.png")
|
@@ -604,4 +611,5 @@ async def main():
|
|
604 |
await server.serve()
|
605 |
|
606 |
if __name__ == "__main__":
|
607 |
-
asyncio.run(main())
|
|
|
|
6 |
import shutil
|
7 |
import subprocess
|
8 |
import time
|
9 |
+
import torch
|
10 |
+
import uvicorn
|
11 |
import cv2
|
12 |
import numpy as np
|
13 |
import pandas_datareader as pdr
|
|
|
54 |
@app.get("/")
|
55 |
def caesaraihome():
|
56 |
return "Welcome to CaesarAI's API's and CaesarAINL."
|
57 |
+
@app.get("/testgpu")
|
58 |
+
def caesaraihome():
|
59 |
+
if torch.cuda.is_available():
|
60 |
+
return "gpu is being used."
|
61 |
+
else:
|
62 |
+
return "gpu is not being used."
|
63 |
@app.get("/caesarailogo")
|
64 |
def caesarailogo():
|
65 |
return FileResponse(f"{CURRENT_DIR}/CaesarAILogo.png")
|
|
|
611 |
await server.serve()
|
612 |
|
613 |
if __name__ == "__main__":
|
614 |
+
#asyncio.run(main())
|
615 |
+
uvicorn.run("main:app",port=7860, log_level="info",host="0.0.0.0",reload=True)
|
run_app.sh
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
#docker build -t palondomus/caesaryolo:latest .
|
2 |
+
docker run -u $(id -u):$(id -g) --gpus all -p $1:$1 -it -v .:/home/user/app --rm palondomus/caesaraiapis:latest bash
|