stefan-it commited on
Commit
7146a69
·
verified ·
1 Parent(s): e40a429

feat: change nanochat model to our German one

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
7
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8
 
9
  def load_model():
10
- model_id = "nanochat-students/chat-d20"
11
 
12
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
13
  model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=False, dtype=torch.bfloat16).to(device)
@@ -51,5 +51,5 @@ def generate(prompt, history):
51
  return output
52
 
53
 
54
- demo = gr.ChatInterface(fn=generate, type="messages", examples=["hello", "hola", "merhaba"], title="NanoChat")
55
  demo.launch()
 
7
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8
 
9
  def load_model():
10
+ model_id = "stefan-it/nanochat-german-v1"
11
 
12
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
13
  model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=False, dtype=torch.bfloat16).to(device)
 
51
  return output
52
 
53
 
54
+ demo = gr.ChatInterface(fn=generate, type="messages", examples=["Hallo", "Servus", "Hi"], title="nanochat German v1")
55
  demo.launch()