Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -414,15 +414,16 @@ def login_auth(username, password):
|
|
414 |
CIMStheme = gr.themes.Soft().set(button_primary_background_fill='#6562F4')
|
415 |
|
416 |
# Initialize an empty list to store the examples
|
417 |
-
ui_examples = []
|
418 |
school_selection = []
|
419 |
|
420 |
schools = get_schools()
|
421 |
sports = get_sports()
|
422 |
interests = get_interests()
|
423 |
|
424 |
-
get_examples()
|
425 |
-
scout_response =
|
|
|
426 |
logged_in_user = 'admin'
|
427 |
|
428 |
with gr.Blocks(CIMStheme) as iface:
|
@@ -433,41 +434,45 @@ with gr.Blocks(CIMStheme) as iface:
|
|
433 |
gr.Markdown(value="# Scout - Powered by CIMS.AI")
|
434 |
with gr.Column(scale=2):
|
435 |
gr.Markdown("")
|
436 |
-
with gr.Row():
|
437 |
-
with gr.Column():
|
438 |
-
school_selection=gr.components.Dropdown(schools,multiselect=True,info="Select one or more schools. This will select avaliable Student Athletes from the school(s)",label="School Selection")
|
439 |
with gr.Column():
|
440 |
-
|
441 |
-
|
442 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
with gr.Row():
|
444 |
with gr.Column():
|
445 |
-
|
446 |
-
with gr.Column():
|
447 |
-
interests=gr.components.Dropdown(interests,multiselect=True,info="Select one or more.",label="Interests")
|
448 |
-
with gr.Column():
|
449 |
-
number_of_athletes=gr.components.Dropdown(["1","2","3","4","5","6","7","8","9","10"],multiselect=False,info="How many athletes are you looking for?",label="Number of Athletes")
|
450 |
-
with gr.Row():
|
451 |
-
with gr.Column():
|
452 |
-
output_format=gr.components.Dropdown(["Summary","Detailed Analysis","Table"],multiselect=False,info="Select the desired output format.",label="Output Format")
|
453 |
with gr.Column():
|
454 |
gr.Markdown("")
|
455 |
with gr.Column():
|
456 |
gr.Markdown("")
|
457 |
-
with gr.Row():
|
458 |
-
with gr.Column():
|
459 |
-
btn = gr.components.Button(value="Submit",size='sm')
|
460 |
-
with gr.Column():
|
461 |
-
gr.Markdown("")
|
462 |
-
with gr.Column():
|
463 |
-
gr.Markdown("")
|
464 |
-
with gr.Row():
|
465 |
-
with gr.Column():
|
466 |
-
gr.components.Markdown(response_label)
|
467 |
-
with gr.Row():
|
468 |
with gr.Column():
|
469 |
-
|
470 |
-
|
|
|
|
|
|
|
|
|
|
|
471 |
with gr.Row():
|
472 |
with gr.Column():
|
473 |
gr.HTML('<center><i>CIMS.AI Confidential 2023</i></center>')
|
|
|
414 |
CIMStheme = gr.themes.Soft().set(button_primary_background_fill='#6562F4')
|
415 |
|
416 |
# Initialize an empty list to store the examples
|
417 |
+
#ui_examples = []
|
418 |
school_selection = []
|
419 |
|
420 |
schools = get_schools()
|
421 |
sports = get_sports()
|
422 |
interests = get_interests()
|
423 |
|
424 |
+
#get_examples()
|
425 |
+
scout_response = "<!DOCTYPEhtml><html><head><title>HTMLTableGenerator</title><style>table{width:100%;border:2pxsolid#000000;padding:5px;}tableth{border:2pxsolid#000000;padding:5px;background:#f0f0f0;color:#000000;}tabletd{border:2pxsolid#000000;text-align:left;padding:5px;background:#ffffff;color:#000000;}</style></head><body><table><thead><tr><th>Rank</th><th>CIMS.AI Scout Ranking</th><th>Athlete Name</th><th>Gender</th><th>Primary Sport</th><th>Social Media Fan Total</th><th>Interests</th><th>Commentary on Ranking</th></tr></thead><tbody><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></body></html>"
|
426 |
+
|
427 |
logged_in_user = 'admin'
|
428 |
|
429 |
with gr.Blocks(CIMStheme) as iface:
|
|
|
434 |
gr.Markdown(value="# Scout - Powered by CIMS.AI")
|
435 |
with gr.Column(scale=2):
|
436 |
gr.Markdown("")
|
437 |
+
with gr.Row(variant='panel'):
|
|
|
|
|
438 |
with gr.Column():
|
439 |
+
with gr.Row():
|
440 |
+
with gr.Column():
|
441 |
+
school_selection=gr.components.Dropdown(schools,multiselect=True,info="Select one or more schools. This will select avaliable Student Athletes from the school(s)",label="School Selection")
|
442 |
+
with gr.Column():
|
443 |
+
gender=gr.components.Dropdown(["Male","Female"],multiselect=True,info="Select one or more.",label="Gender")
|
444 |
+
with gr.Column():
|
445 |
+
social_media_channel=gr.components.Dropdown(["Facebook","Instagram","TikTok","X (Twitter)","YouTube","SnapChat","Twitch"],multiselect=True,info="Select one or more.",label="Social Media Channel")
|
446 |
+
with gr.Row():
|
447 |
+
with gr.Column():
|
448 |
+
sports=gr.components.Dropdown(sports,multiselect=True,info="Select one or more.",label="Sports")
|
449 |
+
with gr.Column():
|
450 |
+
interests=gr.components.Dropdown(interests,multiselect=True,info="Select one or more.",label="Interests")
|
451 |
+
with gr.Column():
|
452 |
+
number_of_athletes=gr.components.Dropdown(["1","2","3","4","5","6","7","8","9","10"],multiselect=False,info="How many athletes are you looking for?",label="Number of Athletes")
|
453 |
+
with gr.Row():
|
454 |
+
with gr.Column():
|
455 |
+
output_format=gr.components.Dropdown(["Summary","Detailed Analysis","Table"],multiselect=False,info="Select the desired output format.",label="Output Format")
|
456 |
+
with gr.Column():
|
457 |
+
gr.Markdown("")
|
458 |
+
with gr.Column():
|
459 |
+
gr.Markdown("")
|
460 |
with gr.Row():
|
461 |
with gr.Column():
|
462 |
+
btn = gr.components.Button(value="Submit",size='sm',elem_id="submit",variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
with gr.Column():
|
464 |
gr.Markdown("")
|
465 |
with gr.Column():
|
466 |
gr.Markdown("")
|
467 |
+
with gr.Row(variant='panel'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
with gr.Column():
|
469 |
+
with gr.Row():
|
470 |
+
with gr.Column():
|
471 |
+
gr.components.Markdown(response_label)
|
472 |
+
with gr.Row():
|
473 |
+
with gr.Column():
|
474 |
+
scout_response = gr.components.HTML(value=scout_response,label="response")
|
475 |
+
btn.click(chatbot, inputs=[school_selection,gender,social_media_channel,sports,interests,output_format,number_of_athletes], outputs=[scout_response])
|
476 |
with gr.Row():
|
477 |
with gr.Column():
|
478 |
gr.HTML('<center><i>CIMS.AI Confidential 2023</i></center>')
|