Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import cv2
|
|
5 |
import uuid
|
6 |
import streamlit as st
|
7 |
from google import generativeai as genai
|
8 |
-
import pywhatkit
|
9 |
|
10 |
# Configure Gemini API
|
11 |
def configure_api():
|
@@ -88,7 +88,7 @@ if "image_path" in st.session_state and st.button("Suggest Hindi Song"):
|
|
88 |
try:
|
89 |
suggested_song = process_image(st.session_state.image_path, model)
|
90 |
st.success(f"🎵 Suggested Hindi Song: {suggested_song}")
|
91 |
-
|
92 |
st.info("Playing song on YouTube...")
|
93 |
except Exception as e:
|
94 |
st.error(f"Error: {e}")
|
|
|
5 |
import uuid
|
6 |
import streamlit as st
|
7 |
from google import generativeai as genai
|
8 |
+
import pywhatkit
|
9 |
|
10 |
# Configure Gemini API
|
11 |
def configure_api():
|
|
|
88 |
try:
|
89 |
suggested_song = process_image(st.session_state.image_path, model)
|
90 |
st.success(f"🎵 Suggested Hindi Song: {suggested_song}")
|
91 |
+
pywhatkit.playonyt(suggested_song)
|
92 |
st.info("Playing song on YouTube...")
|
93 |
except Exception as e:
|
94 |
st.error(f"Error: {e}")
|