Spaces:
Sleeping
Sleeping
extract_json
Browse files
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 |
-
|
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")
|