Commit
·
89de044
1
Parent(s):
3e3da42
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,71 +13,5 @@ def zeroShotClassification(text_input, candidate_labels):
|
|
| 13 |
|
| 14 |
examples = [["One day I will see the world", "travel, live, die, future"]]
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
.output-markdown{display:none !important}
|
| 19 |
-
.gr-button-primary {
|
| 20 |
-
z-index: 14;
|
| 21 |
-
height: 43px;
|
| 22 |
-
width: 130px;
|
| 23 |
-
left: 0px;
|
| 24 |
-
top: 0px;
|
| 25 |
-
padding: 0px;
|
| 26 |
-
cursor: pointer !important;
|
| 27 |
-
background: none rgb(17, 20, 45) !important;
|
| 28 |
-
border: none !important;
|
| 29 |
-
text-align: center !important;
|
| 30 |
-
font-family: Poppins !important;
|
| 31 |
-
font-size: 14px !important;
|
| 32 |
-
font-weight: 500 !important;
|
| 33 |
-
color: rgb(255, 255, 255) !important;
|
| 34 |
-
line-height: 1 !important;
|
| 35 |
-
border-radius: 12px !important;
|
| 36 |
-
transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
|
| 37 |
-
box-shadow: none !important;
|
| 38 |
-
}
|
| 39 |
-
.gr-button-primary:hover{
|
| 40 |
-
z-index: 14;
|
| 41 |
-
height: 43px;
|
| 42 |
-
width: 130px;
|
| 43 |
-
left: 0px;
|
| 44 |
-
top: 0px;
|
| 45 |
-
padding: 0px;
|
| 46 |
-
cursor: pointer !important;
|
| 47 |
-
background: none rgb(37, 56, 133) !important;
|
| 48 |
-
border: none !important;
|
| 49 |
-
text-align: center !important;
|
| 50 |
-
font-family: Poppins !important;
|
| 51 |
-
font-size: 14px !important;
|
| 52 |
-
font-weight: 500 !important;
|
| 53 |
-
color: rgb(255, 255, 255) !important;
|
| 54 |
-
line-height: 1 !important;
|
| 55 |
-
border-radius: 12px !important;
|
| 56 |
-
transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
|
| 57 |
-
box-shadow: rgb(0 0 0 / 23%) 0px 1px 7px 0px !important;
|
| 58 |
-
}
|
| 59 |
-
.hover\:bg-orange-50:hover {
|
| 60 |
-
--tw-bg-opacity: 1 !important;
|
| 61 |
-
background-color: rgb(229,225,255) !important;
|
| 62 |
-
}
|
| 63 |
-
.to-orange-200 {
|
| 64 |
-
--tw-gradient-to: rgb(37 56 133 / 37%) !important;
|
| 65 |
-
}
|
| 66 |
-
.from-orange-400 {
|
| 67 |
-
--tw-gradient-from: rgb(17, 20, 45) !important;
|
| 68 |
-
--tw-gradient-to: rgb(255 150 51 / 0);
|
| 69 |
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
|
| 70 |
-
}
|
| 71 |
-
.group-hover\:from-orange-500{
|
| 72 |
-
--tw-gradient-from:rgb(17, 20, 45) !important;
|
| 73 |
-
--tw-gradient-to: rgb(37 56 133 / 37%);
|
| 74 |
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
|
| 75 |
-
}
|
| 76 |
-
.group:hover .group-hover\:text-orange-500{
|
| 77 |
-
--tw-text-opacity: 1 !important;
|
| 78 |
-
color:rgb(37 56 133 / var(--tw-text-opacity)) !important;
|
| 79 |
-
}
|
| 80 |
-
"""
|
| 81 |
-
|
| 82 |
-
demo = gr.Interface(fn=zeroShotClassification, inputs=[gr.Textbox(label="Input"), gr.Textbox(label="Candidate Labels")], outputs=gr.Label(label="Classification"), title="Zero Shot Text Classification | Data Science Dojo", examples=examples, css=css)
|
| 83 |
-
demo.launch()
|
|
|
|
| 13 |
|
| 14 |
examples = [["One day I will see the world", "travel, live, die, future"]]
|
| 15 |
|
| 16 |
+
demo = gr.Interface(fn=zeroShotClassification, inputs=[gr.Textbox(label="Input"), gr.Textbox(label="Candidate Labels")], outputs=gr.Label(label="Classification"), title="Umer Text Classification", examples=examples, css=css)
|
| 17 |
+
demo.launch(True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|