picocreator commited on
Commit
5dbd048
1 Parent(s): 3cb35fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -19
app.py CHANGED
@@ -39,25 +39,6 @@ model = RWKV(model=model_path, strategy=MODEL_STRAT)
39
  from rwkv.utils import PIPELINE
40
  pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
41
 
42
- # Prompt generation
43
- def generate_prompt(instruction, input=""):
44
- instruction = instruction.strip().replace('\r\n','\n').replace('\n\n','\n')
45
- input = input.strip().replace('\r\n','\n').replace('\n\n','\n')
46
- if input:
47
- return f"""Instruction: {instruction}
48
-
49
- Input: {input}
50
-
51
- Response:"""
52
- else:
53
- return f"""User: hi
54
-
55
- Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it.
56
-
57
- User: {instruction}
58
-
59
- Assistant:"""
60
-
61
  # Translation logic
62
  def translate(text, target_language):
63
  prompt = f"Translate the following English text to {target_language}: '{text}'"
 
39
  from rwkv.utils import PIPELINE
40
  pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  # Translation logic
43
  def translate(text, target_language):
44
  prompt = f"Translate the following English text to {target_language}: '{text}'"