KGSAGAR commited on
Commit
76eb058
·
verified ·
1 Parent(s): 808dc5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -33,8 +33,7 @@ def respond(
33
  temperature,
34
  top_p,
35
  peft_model,
36
- tokenizer_name='your-tokenizer-name',
37
- device='auto' # or 'cpu' based on your setup
38
  ):
39
  """
40
  Generates a response based on the user message and history using the provided PEFT model.
@@ -48,7 +47,6 @@ def respond(
48
  top_p (float): The top_p parameter for nucleus sampling.
49
  peft_model: The pre-trained fine-tuned model for generation.
50
  tokenizer_name (str): The name or path of the tokenizer.
51
- device (str): The device to run the model on ('cuda' or 'cpu').
52
 
53
  Yields:
54
  str: The generated response up to the current token.
 
33
  temperature,
34
  top_p,
35
  peft_model,
36
+ tokenizer_name,
 
37
  ):
38
  """
39
  Generates a response based on the user message and history using the provided PEFT model.
 
47
  top_p (float): The top_p parameter for nucleus sampling.
48
  peft_model: The pre-trained fine-tuned model for generation.
49
  tokenizer_name (str): The name or path of the tokenizer.
 
50
 
51
  Yields:
52
  str: The generated response up to the current token.