Skip to content

Commit

Permalink
modified app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vedanthv authored May 29, 2021
1 parent 07f0c6c commit 81d9ac2
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,6 @@
#else:
#show_explore_page()



# # 1.creating a video object
# video = cv2.VideoCapture(0)
# # 2. Variable
# a = 0
# # 3. While loop
# while True:
# a = a + 1
# # 4.Create a frame object
# check, frame = video.read()
# # Converting to grayscale
# # gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
# # 5.show the frame!
# cv2.imshow("Capturing",frame)
# # 6.for playing
# key = cv2.waitKey(1)
# if key == ord('q'):
# break
# # 7. image saving
# showPic = cv2.imwrite("photo.jpg",frame)
# print(showPic)
# # 8. shutdown the camera
# video.release()
# cv2.destroyAllWindows()


with pred:
st.title("Prediction")
img = cv2.imread('photo.jpg')
Expand All @@ -62,3 +35,9 @@
st.text("Your emotion is {}".format(predictions['dominant_emotion']))


if(predictions['dominant_emotion'] == 'happy'):
my_html = '<iframe src="https://open.spotify.com/embed/playlist/37i9dQZF1DWWQRwui0ExPn" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>'

st.markdown(my_html, unsafe_allow_html=True)


0 comments on commit 81d9ac2

Please sign in to comment.