JKin commited on
Commit
3265c8d
·
verified ·
1 Parent(s): fdfe9b6

Update app.py

Browse files

Updating the layout of the User Interface tab.

Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -11,14 +11,14 @@ def show_stars():
11
  .title-text {
12
  color: white;
13
  font-family: sans-serif;
14
- font-size: 1rem;
15
  font-weight: bold;
16
  }
17
 
18
  /* Empty stars */
19
  .star-rating {
20
  display: inline-block;
21
- font-size: 2em;
22
  color: lightgray;
23
  }
24
 
@@ -33,7 +33,7 @@ def show_stars():
33
  background-color: #1f2937;
34
  padding: 10px;
35
  border-radius: 5px;
36
- width: fit-content;
37
  margin-left: 0;
38
  }
39
 
@@ -42,7 +42,7 @@ def show_stars():
42
  border: 1px transparent;
43
  background-color: #ca8a04;
44
  padding: 3px;
45
- border-radius: 5px;
46
  display: inline-block;
47
  margin-bottom: 6px;
48
  }
@@ -104,14 +104,17 @@ with gr.Blocks(theme=theme) as demo:
104
 
105
  # Basic user interface for company's view -Janika
106
  with gr.Tab("User Interface"):
107
- # Summary
108
- summary_output = gr.Textbox(label="Summary")
 
 
109
 
110
- # Star rating
111
- star_rating = gr.HTML(value=show_stars())
 
112
 
113
- # Keywords
114
- keywords_output = gr.Textbox(label="Keywords")
115
 
116
  # Testing Area, for Piitu -Janika
117
  with gr.Tab("Testing Area"):
 
11
  .title-text {
12
  color: white;
13
  font-family: sans-serif;
14
+ font-size: 14px;
15
  font-weight: bold;
16
  }
17
 
18
  /* Empty stars */
19
  .star-rating {
20
  display: inline-block;
21
+ font-size: 1.5em;
22
  color: lightgray;
23
  }
24
 
 
33
  background-color: #1f2937;
34
  padding: 10px;
35
  border-radius: 5px;
36
+ width: 100%;
37
  margin-left: 0;
38
  }
39
 
 
42
  border: 1px transparent;
43
  background-color: #ca8a04;
44
  padding: 3px;
45
+ border-radius: 8px;
46
  display: inline-block;
47
  margin-bottom: 6px;
48
  }
 
104
 
105
  # Basic user interface for company's view -Janika
106
  with gr.Tab("User Interface"):
107
+ with gr.Row():
108
+ with gr.Column(scale=1, min_width=300):
109
+ # Summary
110
+ summary_output = gr.Textbox(label="Summary")
111
 
112
+ with gr.Column(scale=2, min_width=300):
113
+ # Star rating
114
+ star_rating = gr.HTML(value=show_stars())
115
 
116
+ # Keywords
117
+ keywords_output = gr.Textbox(label="Keywords")
118
 
119
  # Testing Area, for Piitu -Janika
120
  with gr.Tab("Testing Area"):