Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added __pycache__/main.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/Narrator.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/feedAnalyze.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/throat_check.cpython-310.pyc
Binary file not shown.
14 changes: 12 additions & 2 deletions backend/feedAnalyze.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastapi import BackgroundTasks,APIRouter
from fastapi import BackgroundTasks,APIRouter,UploadFile,File
import cv2
import time
from deepface import DeepFace
Expand Down Expand Up @@ -104,4 +104,14 @@ async def process_video_route(background_tasks: BackgroundTasks):

@route_feed_analysis.post("/test-analysis")
def test_data():
return {"emotions": ["angry","disgust","fear","happy","sad","surprise","neutral"],"count_values": [10,0,0,30,1,1,69]}
return {"emotions": ["angry","disgust","fear","happy","sad","surprise","neutral"],"count_values": [10,0,0,30,1,1,69]}

@route_feed_analysis.post("upload-feed")
async def upload_video(video: UploadFile = File(...)):
# Save the uploaded video to a local file
file_location = f"backend\database\kylo\\vid.mp4"
with open(file_location, "wb") as file:
contents = await video.read()
file.write(contents)

return {"message": "Video uploaded successfully.", "file_location": file_location}
Binary file modified emotion_analysis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
allow_headers=["*"],
)

app.include_router(patient)
app.include_router(pdftotext)
app.include_router(eye)
#app.include_router(speech2text)
app.include_router(narrator)
app.include_router(aivideo)
app.include_router(throat)
# app.include_router(patient)
# app.include_router(pdftotext)
# app.include_router(eye)
# #app.include_router(speech2text)
# app.include_router(narrator)
# app.include_router(aivideo)
# app.include_router(throat)
app.include_router(feed_analysis)
#app.include_router(skin)
# include other API routers as needed

if __name__ == "__main__":
uvicorn.run("main:app",port=8023,host='127.0.0.1',reload=True)
uvicorn.run("main:app",port=8023,host='192.168.100.146',reload=True)


# http://192.168.100.146:8023
Binary file modified patientData_requirements.txt
Binary file not shown.