KingNish commited on
Commit
92550dc
1 Parent(s): 2242886

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -14
app.py CHANGED
@@ -40,9 +40,9 @@ def respond(
40
  if llm is None or llm_model != model:
41
  llm = Llama(
42
  model_path=f"models/{model}",
43
- n_gpu_layers=0, # Set to 0 for CPU
44
- n_batch=512, # Reduced batch size for CPU
45
- n_ctx=2048, # Reduced context size for CPU
46
  )
47
  llm_model = model
48
 
@@ -132,18 +132,23 @@ demo = gr.ChatInterface(
132
  label="Repetition penalty",
133
  ),
134
  ],
135
- theme=gr.themes.Soft(primary_hue="violet", secondary_hue="violet", neutral_hue="gray",font=[gr.themes.GoogleFont("Exo"), "ui-sans-serif", "system-ui", "sans-serif"]).set(
136
- body_background_fill_dark="#16141c",
137
- block_background_fill_dark="#16141c",
 
 
 
 
 
138
  block_border_width="1px",
139
- block_title_background_fill_dark="#1e1c26",
140
- input_background_fill_dark="#292733",
141
- button_secondary_background_fill_dark="#24212b",
142
- border_color_accent_dark="#343140",
143
- border_color_primary_dark="#343140",
144
- background_fill_secondary_dark="#16141c",
145
- color_accent_soft_dark="transparent",
146
- code_background_fill_dark="#292733",
147
  ),
148
  title="Meta Llama 3.2 (1B)",
149
  description=description,
 
40
  if llm is None or llm_model != model:
41
  llm = Llama(
42
  model_path=f"models/{model}",
43
+ n_gpu_layers=0,
44
+ n_batch=4096,
45
+ n_ctx=2048,
46
  )
47
  llm_model = model
48
 
 
132
  label="Repetition penalty",
133
  ),
134
  ],
135
+ theme=gr.themes.Default(
136
+ primary_hue="blue",
137
+ secondary_hue="cyan",
138
+ neutral_hue="gray",
139
+ font=[gr.themes.GoogleFont("Roboto"), "ui-sans-serif", "system-ui", "sans-serif"]
140
+ ).set(
141
+ body_background_fill="#f8f9fa",
142
+ block_background_fill="#ffffff",
143
  block_border_width="1px",
144
+ block_title_background_fill="#e9ecef",
145
+ input_background_fill="#f8f9fa",
146
+ button_secondary_background_fill="#007bff",
147
+ border_color_accent="#ced4da",
148
+ border_color_primary="#ced4da",
149
+ background_fill_secondary="#f8f9fa",
150
+ color_accent_soft="#007bff",
151
+ code_background_fill="#f8f9fa",
152
  ),
153
  title="Meta Llama 3.2 (1B)",
154
  description=description,