app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import openai
|
2 |
import os
|
3 |
import gradio as gr
|
|
|
4 |
from dotenv import load_dotenv, find_dotenv
|
5 |
_ = load_dotenv(find_dotenv())
|
6 |
|
@@ -28,7 +29,7 @@ Format your response as a JSON object with \
|
|
28 |
Text sample: '''{input}'''
|
29 |
"""
|
30 |
response = get_completion(prompt)
|
31 |
-
return
|
32 |
|
33 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
34 |
#iface.launch()
|
|
|
1 |
import openai
|
2 |
import os
|
3 |
import gradio as gr
|
4 |
+
import json
|
5 |
from dotenv import load_dotenv, find_dotenv
|
6 |
_ = load_dotenv(find_dotenv())
|
7 |
|
|
|
29 |
Text sample: '''{input}'''
|
30 |
"""
|
31 |
response = get_completion(prompt)
|
32 |
+
return json.dump(response)
|
33 |
|
34 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
35 |
#iface.launch()
|