mrbeliever commited on
Commit
9f11ab8
1 Parent(s): 3d831bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -40,7 +40,13 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
40
  yield output.strip('</s>')
41
  return output.strip('</s>')
42
 
43
- with gr.Blocks() as demo:
 
 
 
 
 
 
44
  with gr.Row():
45
  input_text = gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt")
46
  submit_button = gr.Button("Generate")
@@ -48,13 +54,4 @@ with gr.Blocks() as demo:
48
 
49
  submit_button.click(fn=generate, inputs=input_text, outputs=output_text)
50
 
51
- demo.style(
52
- container_background_color="#121212",
53
- text_color="#ffffff",
54
- input_background_color="#333333",
55
- input_border_color="#555555",
56
- button_background_color="#555555",
57
- button_text_color="#ffffff",
58
- )
59
-
60
  demo.launch()
 
40
  yield output.strip('</s>')
41
  return output.strip('</s>')
42
 
43
+ with gr.Blocks(css="""
44
+ body {background-color: #121212; color: #ffffff;}
45
+ .gradio-container {background-color: #121212; color: #ffffff;}
46
+ input, textarea, select, button {background-color: #333333 !important; color: #ffffff !important; border-color: #555555 !important;}
47
+ .gradio-container button {background-color: #555555 !important;}
48
+ """) as demo:
49
+
50
  with gr.Row():
51
  input_text = gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt")
52
  submit_button = gr.Button("Generate")
 
54
 
55
  submit_button.click(fn=generate, inputs=input_text, outputs=output_text)
56
 
 
 
 
 
 
 
 
 
 
57
  demo.launch()