datasciencedojo commited on
Commit
198e2c6
·
1 Parent(s): 46f5a0c

Update app.py

Browse files

update styling

Files changed (1) hide show
  1. app.py +50 -1
app.py CHANGED
@@ -9,5 +9,54 @@ def text_generator(sample, max_length):
9
 
10
  examples = [["Hello, I'm a language model", "45"], ["Hello, I'm a designer", "30"]]
11
 
12
- demo = gr.Interface(fn=text_generator, inputs=[gr.Textbox(lines=2, placeholder="Enter sample text here", label="Sample text"), gr.Textbox(lines=1, label="Length of generated text")], outputs=[gr.Textbox(label="Generated text 1"), gr.Textbox(label="Generated text 2"), gr.Textbox(label="Generated text 3")], examples=examples)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  demo.launch( debug = True )
 
9
 
10
  examples = [["Hello, I'm a language model", "45"], ["Hello, I'm a designer", "30"]]
11
 
12
+ css = """
13
+ footer {display:none !important}
14
+ .output-markdown{display:none !important}
15
+ .gr-button-primary {
16
+ z-index: 14;
17
+ height: 43px;
18
+ width: 130px;
19
+ left: 0px;
20
+ top: 0px;
21
+ padding: 0px;
22
+ cursor: pointer !important;
23
+ background: none rgb(17, 20, 45) !important;
24
+ border: none !important;
25
+ text-align: center !important;
26
+ font-family: Poppins !important;
27
+ font-size: 14px !important;
28
+ font-weight: 500 !important;
29
+ color: rgb(255, 255, 255) !important;
30
+ line-height: 1 !important;
31
+ border-radius: 12px !important;
32
+ transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
33
+ box-shadow: none !important;
34
+ }
35
+ .gr-button-primary:hover{
36
+ z-index: 14;
37
+ height: 43px;
38
+ width: 130px;
39
+ left: 0px;
40
+ top: 0px;
41
+ padding: 0px;
42
+ cursor: pointer !important;
43
+ background: none rgb(37, 56, 133) !important;
44
+ border: none !important;
45
+ text-align: center !important;
46
+ font-family: Poppins !important;
47
+ font-size: 14px !important;
48
+ font-weight: 500 !important;
49
+ color: rgb(255, 255, 255) !important;
50
+ line-height: 1 !important;
51
+ border-radius: 12px !important;
52
+ transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
53
+ box-shadow: rgb(0 0 0 / 23%) 0px 1px 7px 0px !important;
54
+ }
55
+ .hover\:bg-orange-50:hover {
56
+ --tw-bg-opacity: 1 !important;
57
+ background-color: rgb(229,225,255) !important;
58
+ }
59
+ """
60
+
61
+ demo = gr.Interface(fn=text_generator, inputs=[gr.Textbox(lines=2, placeholder="Enter sample text here", label="Sample text"), gr.Textbox(lines=1, label="Length of generated text")], outputs=[gr.Textbox(label="Generated text 1"), gr.Textbox(label="Generated text 2"), gr.Textbox(label="Generated text 3")],title="Text Generator | Datascience Dojo", examples=examples, css=css)
62
  demo.launch( debug = True )