garrethlee commited on
Commit
e12b172
·
verified ·
1 Parent(s): a99122f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -17
app.py CHANGED
@@ -50,23 +50,22 @@ def respond(
50
  """
51
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
52
  """
53
- with gr.Blocks() as demo:
54
- gr.Markdown("# 🇮🇩 Sahabat AI (Gemma)")
55
- gr.Markdown("#### [Model page](https://huggingface.co/GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct)")
56
- gr.ChatInterface(
57
- respond,
58
- additional_inputs=[
59
- gr.Slider(minimum=1, maximum=2048, value=256, step=1, label="Max new tokens"),
60
- gr.Slider(minimum=0.1, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
61
- gr.Slider(
62
- minimum=0.1,
63
- maximum=1.0,
64
- value=0.95,
65
- step=0.05,
66
- label="Top-p (nucleus sampling)",
67
- ),
68
- ],
69
- )
70
 
71
 
72
  if __name__ == "__main__":
 
50
  """
51
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
52
  """
53
+ demo = gr.ChatInterface(
54
+ respond,
55
+ title = "# 🇮🇩 Sahabat AI (Gemma)",
56
+ description = "#### [Model page](https://huggingface.co/GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct)",
57
+ additional_inputs=[
58
+ gr.Slider(minimum=1, maximum=2048, value=256, step=1, label="Max new tokens"),
59
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
60
+ gr.Slider(
61
+ minimum=0.1,
62
+ maximum=1.0,
63
+ value=0.95,
64
+ step=0.05,
65
+ label="Top-p (nucleus sampling)",
66
+ ),
67
+ ],
68
+ )
 
69
 
70
 
71
  if __name__ == "__main__":