Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,79 @@ from chart_generation import *
|
|
6 |
from charts_advanced import *
|
7 |
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# def update_label(label1):
|
10 |
# return gr.update(choices=list(df.columns))
|
11 |
|
@@ -24,6 +97,11 @@ with gr.Blocks() as demo:
|
|
24 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
25 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
26 |
tb_prompt = gr.Textbox(label="Prompt")
|
|
|
|
|
|
|
|
|
|
|
27 |
tb_filename = gr.Textbox(label="Specific File Name (Optional)")
|
28 |
mist_button = gr.Button("Ask AI")
|
29 |
|
@@ -61,11 +139,11 @@ with gr.Blocks() as demo:
|
|
61 |
|
62 |
btn_search.click(browse_folder, inputs=dd_url, outputs=dd_url)
|
63 |
dd_url.change(browse_folder, inputs=dd_url, outputs=dd_url)
|
64 |
-
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, df_output])
|
65 |
|
66 |
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel], outputs=[fi_excel, tb_message])
|
67 |
|
68 |
-
mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt,
|
69 |
|
70 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
|
71 |
|
|
|
6 |
from charts_advanced import *
|
7 |
|
8 |
|
9 |
+
|
10 |
+
|
11 |
+
# Categories
|
12 |
+
categories = [
|
13 |
+
{
|
14 |
+
"topic": "Confidentiality and Privacy Protection",
|
15 |
+
"description": "This topic covers the protection of confidentiality, privacy, and integrity in security systems. It also includes authentication and authorization processes.",
|
16 |
+
"experts": ["Mireille"]
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"topic": "Distributed Trust and End-User Trust Models",
|
20 |
+
"description": "This topic focuses on distributed trust models and how end-users establish trust in secure systems.",
|
21 |
+
"experts": ["Mireille", "Khawla"]
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"topic": "Secure Element and Key Provisioning",
|
25 |
+
"description": "This topic involves the secure element in systems and the process of key provisioning.",
|
26 |
+
"experts": ["Mireille"]
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"topic": "Residential Gateway Security",
|
30 |
+
"description": "This topic covers the security aspects of Residential Gateways.",
|
31 |
+
"experts": ["Mireille"]
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"topic": "Standalone Non-Public Network (SNPN) Inter-Connection and Cybersecurity",
|
35 |
+
"description": "This topic focuses on the inter-connection of Standalone Non-Public Networks and related cyber-security topics.",
|
36 |
+
"experts": ["Khawla"]
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"topic": "Distributed Ledger and Blockchain in SNPN",
|
40 |
+
"description": "This topic covers the use of distributed ledger technology and blockchain in securing Standalone Non-Public Networks.",
|
41 |
+
"experts": ["Khawla"]
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"topic": "Distributed Networks and Communication",
|
45 |
+
"description": "This topic involves distributed networks such as mesh networks, ad-hoc networks, and multi-hop networks, and their cyber-security aspects.",
|
46 |
+
"experts": ["Guillaume"]
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"topic": "Swarm of Drones and Unmanned Aerial Vehicles Network Infrastructure",
|
50 |
+
"description": "This topic covers the network infrastructure deployed by Swarm of Drones and Unmanned Aerial Vehicles.",
|
51 |
+
"experts": ["Guillaume"]
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"topic": "USIM and Over-the-Air Services",
|
55 |
+
"description": "This topic involves USIM and related over-the-air services such as Steering of Roaming, roaming services, network selection, and UE configuration.",
|
56 |
+
"experts": ["Vincent"]
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"topic": "Eco-Design and Societal Impact of Technology",
|
60 |
+
"description": "This topic covers eco-design concepts, including energy saving, energy efficiency, carbon emissions, and the societal impact of technology.",
|
61 |
+
"experts": ["Pierre"]
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"topic": "Service Requirements of New Services",
|
65 |
+
"description": "This topic involves defining service requirements for new services, detecting low signals of new trends and technologies, and assessing their impact on USIM services or over-the-air services.",
|
66 |
+
"experts": ["Ly-Thanh"]
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"topic": "Satellite and Non Terrestrial Networks",
|
70 |
+
"description": "This topic covers satellite networks, Non Terrestrial Networks, Private Networks, IoT, Inter Satellite communication, and Radio Access Network.",
|
71 |
+
"experts": ["Nicolas"]
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"topic": "Public Safety and Emergency Communication",
|
75 |
+
"description": "This topic involves Public Safety Communication, Military Communication, Emergency Calls, Emergency Services, Disaster Communication Access, and other related areas.",
|
76 |
+
"experts": ["Dorin"]
|
77 |
+
}
|
78 |
+
]
|
79 |
+
|
80 |
+
df_cate = pd.DataFrame(categories)
|
81 |
+
|
82 |
# def update_label(label1):
|
83 |
# return gr.update(choices=list(df.columns))
|
84 |
|
|
|
97 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
98 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
99 |
tb_prompt = gr.Textbox(label="Prompt")
|
100 |
+
with gr.Accordion("Filters", open=False):
|
101 |
+
with gr.Row():
|
102 |
+
dd_searchcol = gr.Dropdown(label="Column to look into (Optional)", multiselect=False, scale=4)
|
103 |
+
dd_keywords = gr.Dropdown(label="Words to look for (Optional)", multiselect=True, allow_custom_value=True, scale=5)
|
104 |
+
sl_client = gr.Slider(label="Mistral API", maximum=1, step=1, interactive=True, scale=1)
|
105 |
tb_filename = gr.Textbox(label="Specific File Name (Optional)")
|
106 |
mist_button = gr.Button("Ask AI")
|
107 |
|
|
|
139 |
|
140 |
btn_search.click(browse_folder, inputs=dd_url, outputs=dd_url)
|
141 |
dd_url.change(browse_folder, inputs=dd_url, outputs=dd_url)
|
142 |
+
fi_excel.change(get_columns, inputs=[fi_excel], outputs=[dd_source_ask, dd_source_class, dd_label1, dd_label2, dd_searchcol, df_output])
|
143 |
|
144 |
btn_extract.click(extractionPrincipale, inputs=[dd_url, fi_excel], outputs=[fi_excel, tb_message])
|
145 |
|
146 |
+
mist_button.click(chat_with_mistral, inputs=[dd_source_ask, tb_destcol, tb_prompt, fi_excel, tb_url, dd_searchcol, dd_keywords, sl_client], outputs=[fi_excel, df_output])
|
147 |
|
148 |
btn_classif.click(classification, inputs=[dd_source_class, fi_excel, df_category], outputs=[fi_excel, df_output])
|
149 |
|