datasciencedojo
commited on
Commit
•
61d26d3
1
Parent(s):
4e3dfa8
Update app.py
Browse filesstyling updated
app.py
CHANGED
@@ -13,5 +13,54 @@ def zeroShotClassification(text_input, candidate_labels):
|
|
13 |
|
14 |
examples = [["One day I will see the world", "travel, live, die, future"]]
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
demo.launch()
|
|
|
13 |
|
14 |
examples = [["One day I will see the world", "travel, live, die, future"]]
|
15 |
|
16 |
+
css = """
|
17 |
+
footer {display:none !important}
|
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 |
+
"""
|
64 |
+
|
65 |
+
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 | Datascience Dojo", examples=examples, css=css)
|
66 |
demo.launch()
|