newworldcrimson commited on
Commit
3b0ba55
·
verified ·
1 Parent(s): 710664b

Update model to google/vaultgemma-1b and system message

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
-
5
  def respond(
6
  message,
7
  history: list[dict[str, str]],
@@ -14,7 +13,7 @@ def respond(
14
  """
15
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
16
  """
17
- client = InferenceClient(token=hf_token.token, model="openai/gpt-oss-20b")
18
 
19
  messages = [{"role": "system", "content": system_message}]
20
 
@@ -47,7 +46,7 @@ chatbot = gr.ChatInterface(
47
  respond,
48
  type="messages",
49
  additional_inputs=[
50
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
51
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
52
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
53
  gr.Slider(
@@ -65,6 +64,5 @@ with gr.Blocks() as demo:
65
  gr.LoginButton()
66
  chatbot.render()
67
 
68
-
69
  if __name__ == "__main__":
70
- demo.launch()
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
 
4
  def respond(
5
  message,
6
  history: list[dict[str, str]],
 
13
  """
14
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
15
  """
16
+ client = InferenceClient(token=hf_token.token, model="google/vaultgemma-1b")
17
 
18
  messages = [{"role": "system", "content": system_message}]
19
 
 
46
  respond,
47
  type="messages",
48
  additional_inputs=[
49
+ gr.Textbox(value="You are a helpful AI assistant powered by Google's VaultGemma 1B model, which is trained with differential privacy to protect training data.", label="System message"),
50
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
51
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
52
  gr.Slider(
 
64
  gr.LoginButton()
65
  chatbot.render()
66
 
 
67
  if __name__ == "__main__":
68
+ demo.launch()