ysharma HF staff commited on
Commit
fd28db2
1 Parent(s): ed165ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -33,25 +33,29 @@ def codegemma(message: str, history: list, temperature: float, max_new_tokens: i
33
  response = tokenizer.decode(outputs[0])
34
  return response
35
 
36
-
37
  placeholder = """
38
- <img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/7dd7659cff2eab51f0f5336f378edfca01dd16fa/gemma_lockup_vertical_full-color_rgb.png" style="width:30%">
39
- <br><b>CodeGemma-7B-IT Chatbot</b>
 
 
40
  """
41
 
 
42
  # Gradio block
43
  chatbot=gr.Chatbot(placeholder=placeholder,)
44
  with gr.Blocks(fill_height=True) as demo:
45
  gr.Markdown("# CODEGEMMA-7b-IT")
46
  gr.ChatInterface(codegemma,
47
- examples=[["Write a Python function to calculate the nth fibonacci number."]],
48
- cache_examples=False,
49
  fill_height=True,
50
  additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
51
  additional_inputs=[
52
  gr.Slider(0, 1, 0.95, label="Temperature", render=False),
53
  gr.Slider(128, 4096, 512, label="Max new tokens", render=False ),
54
  ],
 
 
55
  )
56
 
57
 
 
33
  response = tokenizer.decode(outputs[0])
34
  return response
35
 
36
+
37
  placeholder = """
38
+ <div style="opacity: 0.65;">
39
+ <img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/7dd7659cff2eab51f0f5336f378edfca01dd16fa/gemma_lockup_vertical_full-color_rgb.png" style="width:30%;">
40
+ <br><b>CodeGemma-7B-IT Chatbot</b>
41
+ </div>
42
  """
43
 
44
+
45
  # Gradio block
46
  chatbot=gr.Chatbot(placeholder=placeholder,)
47
  with gr.Blocks(fill_height=True) as demo:
48
  gr.Markdown("# CODEGEMMA-7b-IT")
49
  gr.ChatInterface(codegemma,
50
+ chatbot=chatbot,
 
51
  fill_height=True,
52
  additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
53
  additional_inputs=[
54
  gr.Slider(0, 1, 0.95, label="Temperature", render=False),
55
  gr.Slider(128, 4096, 512, label="Max new tokens", render=False ),
56
  ],
57
+ examples=[["Write a Python function to calculate the nth fibonacci number."]],
58
+ cache_examples=False,
59
  )
60
 
61