bstraehle commited on
Commit
9ae3ad1
1 Parent(s): 483c87c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -37,8 +37,7 @@ def prompt_model(model_id, system_prompt, user_prompt):
37
  {"role": "assistant", "content": ""}
38
  ]
39
 
40
- output = pipe(messages)
41
- print(output)
42
 
43
  return output[0]["generated_text"][-1]["content"]
44
 
@@ -46,7 +45,7 @@ def fine_tune_model(model_id):
46
  tokenizer = download_model(model_id)
47
  model_repo_name = upload_model(model_id, tokenizer)
48
 
49
- return ""
50
 
51
  def download_model(model_id):
52
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
37
  {"role": "assistant", "content": ""}
38
  ]
39
 
40
+ output = pipe(messages, device="cuda")
 
41
 
42
  return output[0]["generated_text"][-1]["content"]
43
 
 
45
  tokenizer = download_model(model_id)
46
  model_repo_name = upload_model(model_id, tokenizer)
47
 
48
+ return model_repo_name
49
 
50
  def download_model(model_id):
51
  tokenizer = AutoTokenizer.from_pretrained(model_id)