json.dumps
Browse files
app.py
CHANGED
|
@@ -118,7 +118,7 @@ Give a score for the product. Format your response as a JSON object with \
|
|
| 118 |
print(total_prompt)
|
| 119 |
response = get_completion(total_prompt)
|
| 120 |
gen_text = response["predictions"][0]["generated_text"]
|
| 121 |
-
return extract_json(gen_text, 3)
|
| 122 |
#return json.dumps(response)
|
| 123 |
|
| 124 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 118 |
print(total_prompt)
|
| 119 |
response = get_completion(total_prompt)
|
| 120 |
gen_text = response["predictions"][0]["generated_text"]
|
| 121 |
+
return json.dumps(extract_json(gen_text, 3))
|
| 122 |
#return json.dumps(response)
|
| 123 |
|
| 124 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|