debisoft commited on
Commit
386d16c
1 Parent(s): ae079c6

extract_json

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -121,8 +121,8 @@ Give a score for the product. Format your response as a JSON object with \
121
  #gen_text = response["predictions"][0]["generated_text"]
122
  #return json.dumps(extract_json(gen_text, 3))
123
  gen_text = response["choices"][0]["text"]
124
- return gen_text
125
- #return json.dumps(response)
126
  #return json.dumps(response)
127
 
128
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
121
  #gen_text = response["predictions"][0]["generated_text"]
122
  #return json.dumps(extract_json(gen_text, 3))
123
  gen_text = response["choices"][0]["text"]
124
+ #return gen_text
125
+ return json.dumps(extract_json(gen_text, 0))
126
  #return json.dumps(response)
127
 
128
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")