Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
import os
|
3 |
|
4 |
from agent_langchain import agent_langchain
|
5 |
from agent_llamaindex import agent_llamaindex
|
@@ -17,6 +17,9 @@ config = {
|
|
17 |
"temperature": 0
|
18 |
}
|
19 |
|
|
|
|
|
|
|
20 |
def invoke(openai_api_key, prompt, agent_option):
|
21 |
if (openai_api_key == ""):
|
22 |
raise gr.Error("OpenAI API Key is required.")
|
|
|
1 |
import gradio as gr
|
2 |
+
import logging, os, sys
|
3 |
|
4 |
from agent_langchain import agent_langchain
|
5 |
from agent_llamaindex import agent_llamaindex
|
|
|
17 |
"temperature": 0
|
18 |
}
|
19 |
|
20 |
+
logging.basicConfig(stream = sys.stdout, level = logging.INFO)
|
21 |
+
logging.getLogger().addHandler(logging.StreamHandler(stream = sys.stdout))
|
22 |
+
|
23 |
def invoke(openai_api_key, prompt, agent_option):
|
24 |
if (openai_api_key == ""):
|
25 |
raise gr.Error("OpenAI API Key is required.")
|