Samuel L Meyers commited on
Commit
b424c57
1 Parent(s): 320c4ed
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import torch
7
  from conversation import get_default_conv_template
8
  import gradio as gr
9
  from llama_cpp import Llama
10
- import wget
11
 
12
  """
13
 
@@ -39,7 +39,8 @@ def m3b_talk(text):
39
 
40
  for token in lcpp_model(formattedQuery, stop=["[|User|]", "\n"], echo=True):
41
  resp += token
42
- answer = resp["choices"][0]["text"].replace(formattedQuery, "")
 
43
  return answer
44
 
45
  def main():
 
7
  from conversation import get_default_conv_template
8
  import gradio as gr
9
  from llama_cpp import Llama
10
+ import json
11
 
12
  """
13
 
 
39
 
40
  for token in lcpp_model(formattedQuery, stop=["[|User|]", "\n"], echo=True):
41
  resp += token
42
+ jsn = json.loads(resp)
43
+ answer = jsn["choices"][0]["text"].replace(formattedQuery, "")
44
  return answer
45
 
46
  def main():