Commit 71452676 authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

create color model and routs

parent 2b6e8d58
......@@ -3,6 +3,7 @@
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/API/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
......
from db.dbConnection import get_data_sql
#
#
def getColorActivities():
qry = 'SELECT * FROM coloractivities'
name = get_data_sql(qry).to_json()
return name
\ No newline at end of file
......@@ -2,4 +2,4 @@ from flask import Blueprint
routes = Blueprint('routes', __name__)
from .reading import *
from .test import *
\ No newline at end of file
from .color import *
from . import routes
# from API.db.dbConnection import get_data_sql
from models.clorModel import getColorActivities
#
#
@routes.route("/colorActivities", methods=['GET'])
def ColorActivity():
return getColorActivities()
\ No newline at end of file
from . import routes
@routes.route("/y")
def test():
return "list of yyyyy"
......@@ -71,8 +71,8 @@ def Keyword_Spotting_service():
if __name__ == "__main__":
kss = Keyword_Spotting_service()
keyword1 = kss.predict("test/0ab3b47d_nohash_0.wav")
keyword2 = kss.predict("test/blu7.wav")
keyword1 = kss.predict("test/00f0204f_nohash_0.wav")
# keyword2 = kss.predict("test/blu7.wav")
print(f"Predicted Keywords: {keyword1}")
print(f"Predicted Keywords: {keyword2}")
\ No newline at end of file
# print(f"Predicted Keywords: {keyword2}")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment