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

Merge branch 'it18218640' into 'master'

create color model and routes

See merge request !47
parents 78eff4ca ef37793c
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/API/venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <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 ...@@ -2,4 +2,4 @@ from flask import Blueprint
routes = Blueprint('routes', __name__) routes = Blueprint('routes', __name__)
from .reading import * from .reading import *
from .test import * from .color import *
\ No newline at end of file
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(): ...@@ -71,8 +71,8 @@ def Keyword_Spotting_service():
if __name__ == "__main__": if __name__ == "__main__":
kss = Keyword_Spotting_service() kss = Keyword_Spotting_service()
keyword1 = kss.predict("test/0ab3b47d_nohash_0.wav") keyword1 = kss.predict("test/00f0204f_nohash_0.wav")
keyword2 = kss.predict("test/blu7.wav") # keyword2 = kss.predict("test/blu7.wav")
print(f"Predicted Keywords: {keyword1}") print(f"Predicted Keywords: {keyword1}")
print(f"Predicted Keywords: {keyword2}") # print(f"Predicted Keywords: {keyword2}")
\ No newline at end of file \ 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