Commit
·
ad24ba0
1
Parent(s):
c66a1df
update app
Browse files- .gradio/certificate.pem +31 -0
- app.py +16 -8
- ticket-predictions.csv +3 -5
.gradio/certificate.pem
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----BEGIN CERTIFICATE-----
|
| 2 |
+
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
|
| 3 |
+
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
| 4 |
+
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
|
| 5 |
+
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
|
| 6 |
+
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
|
| 7 |
+
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
|
| 8 |
+
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
|
| 9 |
+
0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
|
| 10 |
+
A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
|
| 11 |
+
T8KOEUt+zwvo/7V3LvSye0rgTBIlDH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Iuvtd7u+Nxe5AW0wdeRlN8NwdC
|
| 26 |
+
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
|
| 27 |
+
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
|
| 28 |
+
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
|
| 29 |
+
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
|
| 30 |
+
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
| 31 |
+
-----END CERTIFICATE-----
|
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import pickle
|
|
| 5 |
import pandas as pd
|
| 6 |
from transformers import RobertaTokenizerFast, RobertaModel
|
| 7 |
|
|
|
|
| 8 |
# Load label mappings
|
| 9 |
with open("label_mappings.pkl", "rb") as f:
|
| 10 |
label_mappings = pickle.load(f)
|
|
@@ -84,19 +85,26 @@ def clear_inputs():
|
|
| 84 |
return "Enter Text", "", None, "", None
|
| 85 |
|
| 86 |
|
| 87 |
-
# Custom CSS
|
| 88 |
custom_css = """
|
| 89 |
-
.gradio-container { max-width:
|
| 90 |
-
#title { text-align: center; font-size:
|
| 91 |
-
#predict-button, #clear-button { width: 100% !important; height:
|
| 92 |
-
#results-box { height:
|
| 93 |
"""
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
# Gradio App UI
|
| 96 |
-
with gr.Blocks(css=
|
| 97 |
gr.Markdown(
|
| 98 |
"""
|
| 99 |
-
#
|
| 100 |
|
| 101 |
**Supports:** Multi-line text input & CSV upload.
|
| 102 |
**Output:** Text results & downloadable CSV file.
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
from transformers import RobertaTokenizerFast, RobertaModel
|
| 7 |
|
| 8 |
+
# Implement by MinTheinWin@3907578Y
|
| 9 |
# Load label mappings
|
| 10 |
with open("label_mappings.pkl", "rb") as f:
|
| 11 |
label_mappings = pickle.load(f)
|
|
|
|
| 85 |
return "Enter Text", "", None, "", None
|
| 86 |
|
| 87 |
|
| 88 |
+
# Custom CSS for Better UI Scaling
|
| 89 |
custom_css = """
|
| 90 |
+
.gradio-container { max-width: 1400px !important; margin: auto !important; }
|
| 91 |
+
#title { text-align: center; font-size: 26px !important; font-weight: bold; }
|
| 92 |
+
#predict-button, #clear-button, #download-button { width: 100% !important; height: 55px !important; font-size: 18px !important; }
|
| 93 |
+
#results-box { height: 350px !important; overflow-y: auto !important; background: #f9f9f9; padding: 15px; border-radius: 10px; font-size: 16px; }
|
| 94 |
"""
|
| 95 |
+
custom_css1 = """
|
| 96 |
+
.gradio-container { max-width: 1400px !important; margin: auto !important; }
|
| 97 |
+
#title { text-align: center; font-size: 26px !important; font-weight: bold; }
|
| 98 |
+
#predict-button, #clear-button, #download-button { width: 100% !important; height: 55px !important; font-size: 18px !important; }
|
| 99 |
+
#results-box { height: 350px !important; overflow-y: auto !important; background: #f9f9f9; padding: 15px; border-radius: 10px; font-size: 16px; }
|
| 100 |
+
#download-csv-file input { height: 30px !important; font-size: 14px !important; padding: 5px !important; }
|
| 101 |
+
"""
|
| 102 |
+
#".gradio-container {max-width: 1500px; margin: auto;}"
|
| 103 |
# Gradio App UI
|
| 104 |
+
with gr.Blocks(css=custom_css1) as app:
|
| 105 |
gr.Markdown(
|
| 106 |
"""
|
| 107 |
+
# AI Solution for Defect Ticket Classification
|
| 108 |
|
| 109 |
**Supports:** Multi-line text input & CSV upload.
|
| 110 |
**Output:** Text results & downloadable CSV file.
|
ticket-predictions.csv
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
Index,Description,Assigned Team,Team Email
|
| 2 |
-
1,
|
| 3 |
-
2,
|
| 4 |
-
3,
|
| 5 |
-
4,System crashes due to misconfigured runtime environments.,Infrastructure Team,infra.team@company.com
|
| 6 |
-
5,Unauthorized access detected in restricted sections of the application.,Security Team,security.team@company.com
|
|
|
|
| 1 |
Index,Description,Assigned Team,Team Email
|
| 2 |
+
1,Incorrect error handling in exception module.,Code Review Team,codereview.team@company.com
|
| 3 |
+
2,Implement input sanitization to prevent injection attacks.,Code Review Team,codereview.team@company.com
|
| 4 |
+
3,Error Handling Needs Improvement,Code Review Team,codereview.team@company.com
|
|
|
|
|
|