I'm new on pythonanywhere, does anyone can help me with the following code which encounting permission denied problem and tensorflow issues. thank you.
import cv2 as cv
import mediapipe as mp
import numpy as np
from flask import Flask, request
#from mysql import id, name
# Link the website to open
app = Flask(__name__)
app.config
# Delclare variables
mpHands = mp.solutions.hands
hands = mpHands.Hands()
nailID = [4, 8, 12, 16, 20]
nailImg = ""
@app.route("/", methods=["GET", "POST"])
# Image processing (OpenCV)
def imgProc(img):
gray = cv.cvtColor(img, cv.COLOR_BGR2RGB)
handDet = hands.process(gray)
return handDet
# Run functions
def main():
vidCap = cv.VideoCapture(0)
while True:
# Capture and display camera screen
cam, frame = vidCap.read()
handDet = imgProc(frame)
imgRender(frame, handDet)
cv.imshow("Try On!", frame)
if cv.waitKey(1) == ord('q'):
vidCap.release()
cv.destroyAllWindows()
if __name__ == "__main__":
# app.run(debug=True)
app.run(debug=True,port=80)
main()
[edit by admin: formatting]