app.py
CHANGED
|
@@ -126,8 +126,10 @@ Below is an instruction that describes a task, paired with an input that provide
|
|
| 126 |
### Response:\\n\
|
| 127 |
"""
|
| 128 |
|
| 129 |
-
response =
|
| 130 |
-
|
|
|
|
|
|
|
| 131 |
|
| 132 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 133 |
#iface.launch()
|
|
|
|
| 126 |
### Response:\\n\
|
| 127 |
"""
|
| 128 |
|
| 129 |
+
response = get_completion(n_shot_learning + prompt_template)
|
| 130 |
+
gen_text = response["predictions"][0]["generated_text"]
|
| 131 |
+
return extract_json(gen_text, 3)
|
| 132 |
+
#return json.dumps(response)
|
| 133 |
|
| 134 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 135 |
#iface.launch()
|