Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ def chat_with_gpt(api_key, model, message):
|
|
14 |
{"role": "user", "content": message},
|
15 |
]
|
16 |
)
|
|
|
17 |
return response.choices[0].message['content']
|
18 |
|
19 |
def fact_check(openai_api_key, serper_api_key, scraper_api_key, model, message, response, category):
|
@@ -36,6 +37,7 @@ def fact_check(openai_api_key, serper_api_key, scraper_api_key, model, message,
|
|
36 |
os.environ['SCRAPER_API_KEY'] = ''
|
37 |
os.environ['SERPER_API_KEY'] = ''
|
38 |
os.environ['OPENAI_API_KEY'] = ''
|
|
|
39 |
return response_list
|
40 |
|
41 |
with gr.Blocks() as demo:
|
|
|
14 |
{"role": "user", "content": message},
|
15 |
]
|
16 |
)
|
17 |
+
openai.api_key = ''
|
18 |
return response.choices[0].message['content']
|
19 |
|
20 |
def fact_check(openai_api_key, serper_api_key, scraper_api_key, model, message, response, category):
|
|
|
37 |
os.environ['SCRAPER_API_KEY'] = ''
|
38 |
os.environ['SERPER_API_KEY'] = ''
|
39 |
os.environ['OPENAI_API_KEY'] = ''
|
40 |
+
openai.api_key = ''
|
41 |
return response_list
|
42 |
|
43 |
with gr.Blocks() as demo:
|