broadfield commited on
Commit
f64fa83
·
verified ·
1 Parent(s): 8037104

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,7 +18,7 @@ def format_prompt(message, history):
18
  except Exception as e:
19
  print(e)
20
  prompt += f"[INST] {message} [/INST]"
21
- return prompt
22
 
23
  def generate(prompt,history):
24
  seed = random.randint(1,9999999999999)
@@ -39,8 +39,8 @@ def generate(prompt,history):
39
  buf = ""
40
  for response in stream:
41
  output += response.token.text
42
- yield [(prompt,output)], ""
43
- yield [(prompt,output)], output
44
  def tts(inp,voice,length,noise,width,sen_pause):
45
  #print(inp)
46
  #print(type(inp))
 
18
  except Exception as e:
19
  print(e)
20
  prompt += f"[INST] {message} [/INST]"
21
+ return prompt
22
 
23
  def generate(prompt,history):
24
  seed = random.randint(1,9999999999999)
 
39
  buf = ""
40
  for response in stream:
41
  output += response.token.text
42
+ yield [history,(prompt,output)], ""
43
+ yield [history,(prompt,output)], output
44
  def tts(inp,voice,length,noise,width,sen_pause):
45
  #print(inp)
46
  #print(type(inp))