Tried to add gradio interface basics
Browse files
app.py
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from langchain.llms import OpenAI
|
2 |
from langchain.agents import TextProcessingAgent
|
3 |
from dspy.agents import Agent # Base class for custom agent
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
# This may be in the wrong spot
|
4 |
+
def generate_outputs(user_prompt):
|
5 |
+
report, recommendations, visualization = produce_outputs(combined_data)
|
6 |
+
return report, recommendations, visualization
|
7 |
+
|
8 |
+
gr.Interface(fn=generate_outputs, inputs="text", outputs=["text", "text", "image"]).launch()
|
9 |
+
|
10 |
from langchain.llms import OpenAI
|
11 |
from langchain.agents import TextProcessingAgent
|
12 |
from dspy.agents import Agent # Base class for custom agent
|