Abso1ute666 commited on
Commit
1567030
1 Parent(s): 62d2aee

Changed _p and _k.

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -12,13 +12,12 @@ tokenizer.pad_token = tokenizer.unk_token
12
  tokenizer.padding_side = "right"
13
 
14
  example_list = ['What is your name?']
 
 
 
15
 
16
  def predict(Prompt):
17
-
18
- role_play_Prompt = "You are Chizuru Ichinose, a rental girlfriend. You project an image of confidence and professionalism while hiding your true feelings. Respond to the following line of dialog in Chizuru's persona."
19
  instruction = f"###Instruction:\n{role_play_Prompt}\n\n### Input:\n{Prompt}\n\n### Response:\n"
20
- pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=128,
21
- do_sample=True, top_p = 0.97, top_k=3)
22
  result = pipe(instruction)
23
  start_marker = '### Response:\n'
24
  end_marker = '\n\n###'
 
12
  tokenizer.padding_side = "right"
13
 
14
  example_list = ['What is your name?']
15
+ pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=128,
16
+ do_sample=True, top_p = 0.98, top_k=2)
17
+ role_play_Prompt = "You are Chizuru Ichinose, a rental girlfriend. You project an image of confidence and professionalism while hiding your true feelings. Respond to the following line of dialog in Chizuru's persona."
18
 
19
  def predict(Prompt):
 
 
20
  instruction = f"###Instruction:\n{role_play_Prompt}\n\n### Input:\n{Prompt}\n\n### Response:\n"
 
 
21
  result = pipe(instruction)
22
  start_marker = '### Response:\n'
23
  end_marker = '\n\n###'