dwb2023 commited on
Commit
7e7282e
1 Parent(s): ff5307e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -9,8 +9,22 @@ install_flash_attn()
9
  HF_TOKEN = os.getenv("HF_TOKEN")
10
  authenticate_hf(HF_TOKEN)
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  # Create the Gradio Blocks interface
13
- with gr.Blocks(css="styles.css") as demo:
14
  with gr.Row():
15
  with gr.Column():
16
  textbox = gr.Textbox(label="Model Name", placeholder="Enter the model name here OR select example below...", lines=1)
@@ -45,8 +59,8 @@ with gr.Blocks(css="styles.css") as demo:
45
  )
46
  submit_button = gr.Button("Submit")
47
  with gr.Column():
48
- output = gr.Textbox(label="Model Architecture", lines=20, placeholder="Model architecture will appear here...", show_copy_button=True, elem_classes=["model-architecture"])
49
- error_output = gr.Textbox(label="Error", lines=10, placeholder="Exceptions will appear here...", show_copy_button=True, elem_classes=["error-box"])
50
 
51
  def handle_click(model_name):
52
  model_summary, error_message = get_model_summary(model_name)
 
9
  HF_TOKEN = os.getenv("HF_TOKEN")
10
  authenticate_hf(HF_TOKEN)
11
 
12
+ # Define a customized theme based on the Soft theme
13
+ theme = gr.themes.Soft(
14
+ primary_hue="blue",
15
+ secondary_hue="green",
16
+ neutral_hue="gray",
17
+ spacing_size="lg",
18
+ radius_size="sm",
19
+ text_size="lg"
20
+ ).set(
21
+ button_primary_background_fill="*primary_500",
22
+ button_primary_background_fill_hover="*primary_700",
23
+ button_primary_border_radius="*radius_md"
24
+ )
25
+
26
  # Create the Gradio Blocks interface
27
+ with gr.Blocks(theme=theme) as demo:
28
  with gr.Row():
29
  with gr.Column():
30
  textbox = gr.Textbox(label="Model Name", placeholder="Enter the model name here OR select example below...", lines=1)
 
59
  )
60
  submit_button = gr.Button("Submit")
61
  with gr.Column():
62
+ output = gr.Textbox(label="Model Architecture", lines=20, placeholder="Model architecture will appear here...", show_copy_button=True)
63
+ error_output = gr.Textbox(label="Error", lines=10, placeholder="Exceptions will appear here...", show_copy_button=True)
64
 
65
  def handle_click(model_name):
66
  model_summary, error_message = get_model_summary(model_name)