RishabA commited on
Commit
3e11502
·
verified ·
1 Parent(s): 7ef9aa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -43,6 +43,12 @@ body {
43
  font-family: Arial, sans-serif;
44
  }
45
 
 
 
 
 
 
 
46
  h1 {
47
  font-size: 36px;
48
  font-weight: bold;
@@ -90,6 +96,7 @@ h1 {
90
  """
91
 
92
  with gr.Blocks(css=css_str) as demo:
 
93
  gr.Markdown("<h1>Sentiment Analysis</h1>")
94
  gr.Markdown(
95
  "<div class='description'>Enter a sentence and see the predicted sentiment.</div>"
@@ -100,6 +107,7 @@ with gr.Blocks(css=css_str) as demo:
100
  predict_btn = gr.Button("Predict Sentiment")
101
  output_box = gr.Textbox(label="Predicted Sentiment")
102
  predict_btn.click(fn=predict_sentiment, inputs=text_input, outputs=output_box)
 
103
 
104
  if __name__ == "__main__":
105
  demo.launch(share=True)
 
43
  font-family: Arial, sans-serif;
44
  }
45
 
46
+ .container {
47
+ max-width: 600px;
48
+ margin: 40px auto;
49
+ padding: 20px;
50
+ }
51
+
52
  h1 {
53
  font-size: 36px;
54
  font-weight: bold;
 
96
  """
97
 
98
  with gr.Blocks(css=css_str) as demo:
99
+ gr.HTML("<div class='container'>")
100
  gr.Markdown("<h1>Sentiment Analysis</h1>")
101
  gr.Markdown(
102
  "<div class='description'>Enter a sentence and see the predicted sentiment.</div>"
 
107
  predict_btn = gr.Button("Predict Sentiment")
108
  output_box = gr.Textbox(label="Predicted Sentiment")
109
  predict_btn.click(fn=predict_sentiment, inputs=text_input, outputs=output_box)
110
+ gr.HTML("</div>")
111
 
112
  if __name__ == "__main__":
113
  demo.launch(share=True)