Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,13 @@ import gradio as gr
|
|
2 |
import logging, os, sys, threading, time
|
3 |
|
4 |
from agent_langchain import agent_langchain
|
5 |
-
from agent_llamaindex import agent_llamaindex
|
6 |
from openai import OpenAI
|
7 |
from trace import trace_wandb
|
8 |
|
9 |
from dotenv import load_dotenv, find_dotenv
|
10 |
_ = load_dotenv(find_dotenv())
|
11 |
|
12 |
-
import nltk
|
13 |
-
nltk.download('wordnet')
|
14 |
-
|
15 |
lock = threading.Lock()
|
16 |
|
17 |
AGENT_OFF = "Off"
|
@@ -52,11 +49,11 @@ def invoke(openai_api_key, prompt, agent_option):
|
|
52 |
)
|
53 |
|
54 |
result = completion["output"]
|
55 |
-
elif (agent_option == AGENT_LLAMAINDEX):
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
else:
|
61 |
client = OpenAI()
|
62 |
|
|
|
2 |
import logging, os, sys, threading, time
|
3 |
|
4 |
from agent_langchain import agent_langchain
|
5 |
+
#from agent_llamaindex import agent_llamaindex
|
6 |
from openai import OpenAI
|
7 |
from trace import trace_wandb
|
8 |
|
9 |
from dotenv import load_dotenv, find_dotenv
|
10 |
_ = load_dotenv(find_dotenv())
|
11 |
|
|
|
|
|
|
|
12 |
lock = threading.Lock()
|
13 |
|
14 |
AGENT_OFF = "Off"
|
|
|
49 |
)
|
50 |
|
51 |
result = completion["output"]
|
52 |
+
#elif (agent_option == AGENT_LLAMAINDEX):
|
53 |
+
# result = agent_llamaindex(
|
54 |
+
# config,
|
55 |
+
# prompt
|
56 |
+
# )
|
57 |
else:
|
58 |
client = OpenAI()
|
59 |
|