BramVanroy commited on
Commit
715abb0
1 Parent(s): 0fac8ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,6 +16,7 @@ DEFAULT_MAX_NEW_TOKENS = 1024
16
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "8192"))
17
 
18
  model_id = "BramVanroy/fietje-2b-chat"
 
19
  model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
20
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
21
  tokenizer = AutoTokenizer.from_pretrained(model_id)
@@ -93,7 +94,7 @@ chat_interface = gr.ChatInterface(
93
  chatbot=gr.Chatbot(height=450,
94
  label="Fietje",
95
  show_share_button=True,
96
- avatar_images=(None, 'fietje-2b-avatar.png')),
97
  additional_inputs=[
98
  gr.Slider(
99
  label="Max new tokens",
@@ -146,9 +147,9 @@ chat_interface = gr.ChatInterface(
146
  ["Wat is het belang van open-source taalmodellen?"],
147
  ],
148
  title="Fietje",
149
- description="""\
150
  <div style="float: left; margin-right: 1em; margin-bottom: 0.48em; max-width: 96px;">
151
- <img src="fietje-2b-banner.png" style="display: inline-block; width: auto; height: auto;border-radius:50%">
152
  <div style="clear: both"></div>
153
  </div>
154
 
 
16
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "8192"))
17
 
18
  model_id = "BramVanroy/fietje-2b-chat"
19
+ avatar_url = "https://huggingface.co/spaces/BramVanroy/fietje-2b/resolve/main/img/fietje-2b-avatar.png"
20
  model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
21
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
22
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
94
  chatbot=gr.Chatbot(height=450,
95
  label="Fietje",
96
  show_share_button=True,
97
+ avatar_images=(None, avatar_url)),
98
  additional_inputs=[
99
  gr.Slider(
100
  label="Max new tokens",
 
147
  ["Wat is het belang van open-source taalmodellen?"],
148
  ],
149
  title="Fietje",
150
+ description=f"""\
151
  <div style="float: left; margin-right: 1em; margin-bottom: 0.48em; max-width: 96px;">
152
+ <img src={avatar_url} style="display: inline-block; width: auto; height: auto;border-radius:50%">
153
  <div style="clear: both"></div>
154
  </div>
155