rohankaran commited on
Commit
ef59d27
1 Parent(s): f27285c

Update CSS styling and add footer links in app.py

Browse files

Updated CSS to include width and text alignment properties improving the presentation of the application. The footer was also enhanced by adding links to Blog, Twitter, LinkedIn and forms for users interested in AI evaluator roles or stress testing their AI models.

Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -216,8 +216,16 @@ with gr.Blocks(
216
  #model_description_markdown table {
217
  width: 100%;
218
  }
 
 
 
 
 
 
 
 
 
219
  """,
220
- fill_height=True,
221
  js="""
222
  function () {
223
  let searchParams = new URLSearchParams(window.location.search);
@@ -243,10 +251,16 @@ with gr.Blocks(
243
  gr.Markdown(
244
  """
245
  <div align="center">
246
- <h1 style="display: inline-block; margin-bottom: -1.5rem;">Chatbot Guardrails Arena</h1>
247
  </div>
248
  """
249
  )
 
 
 
 
 
 
250
  with gr.Tab(label="⚔️ Arena"):
251
  gr.Markdown(
252
  """
@@ -637,7 +651,6 @@ with gr.Blocks(
637
 
638
  # random_example_btn.click(textbox_random_example, inputs=[], outputs=[textbox])
639
 
640
-
641
  if __name__ == "__main__":
642
  demo.queue(default_concurrency_limit=10)
643
  demo.launch(show_api=False, allowed_paths=["./static"])
 
216
  #model_description_markdown table {
217
  width: 100%;
218
  }
219
+ .w-100 {
220
+ width: 100% !important;
221
+ }
222
+ .w-100 table {
223
+ width: 100% !important;
224
+ }
225
+ .text-center {
226
+ text-align: center;
227
+ }
228
  """,
 
229
  js="""
230
  function () {
231
  let searchParams = new URLSearchParams(window.location.search);
 
251
  gr.Markdown(
252
  """
253
  <div align="center">
254
+ <h1 style="display: inline-block; margin-bottom: -1.8rem;">Chatbot Guardrails Arena</h1>
255
  </div>
256
  """
257
  )
258
+ gr.Markdown(
259
+ """
260
+ [Blog](https://huggingface.co/blog/arena-lighthouz) | [Twitter](https://twitter.com/lighthouzai) | [LinkedIn](https://www.linkedin.com/company/lighthouz-ai) | [Want to continue the fun? Sign up to be an AI evaluator](https://forms.gle/NBS7e7tav5ZYgoWK9) | [Want to get your AI models stress tested? Sign up here](https://forms.gle/ecM1eCxFeraoVDgH7)
261
+ """,
262
+ elem_classes=["w-100", "text-center"]
263
+ )
264
  with gr.Tab(label="⚔️ Arena"):
265
  gr.Markdown(
266
  """
 
651
 
652
  # random_example_btn.click(textbox_random_example, inputs=[], outputs=[textbox])
653
 
 
654
  if __name__ == "__main__":
655
  demo.queue(default_concurrency_limit=10)
656
  demo.launch(show_api=False, allowed_paths=["./static"])