Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,18 +2,15 @@ from langchain import OpenAI, LLMChain
|
|
2 |
from langchain.agents import initialize_agent, Tool, ZeroShotAgent, AgentExecutor
|
3 |
from langchain.prompts import PromptTemplate
|
4 |
from langchain.prompts.few_shot import FewShotPromptTemplate
|
5 |
-
import gradio as gr
|
6 |
-
|
7 |
-
"""# Space Implementation"""
|
8 |
-
|
9 |
-
clerkieExamples=["how do I use langchain?", "How do I create an agent with custom LLMChain?"]
|
10 |
-
|
11 |
import requests
|
12 |
import random
|
13 |
-
import gradio as gr
|
14 |
import openai
|
15 |
import re
|
|
|
16 |
|
|
|
|
|
|
|
17 |
|
18 |
def chat(message, history):
|
19 |
print(message)
|
@@ -43,11 +40,11 @@ def set_text(inp):
|
|
43 |
def clear(arg):
|
44 |
return ""
|
45 |
|
46 |
-
with gr.Blocks() as demo:
|
47 |
user_state=gr.State([])
|
48 |
-
gr.Markdown("""#
|
49 |
-
gr.Markdown("""
|
50 |
-
gr.Markdown("""### [clerkie.co](https://clerkie.co/)""")
|
51 |
with gr.Row():
|
52 |
with gr.Column():
|
53 |
output = gr.Chatbot().style(color_map=("orange", "green"))
|
@@ -65,4 +62,4 @@ with gr.Blocks() as demo:
|
|
65 |
cache_examples=False,
|
66 |
)
|
67 |
if __name__ == "__main__":
|
68 |
-
demo.launch(debug=True)
|
|
|
2 |
from langchain.agents import initialize_agent, Tool, ZeroShotAgent, AgentExecutor
|
3 |
from langchain.prompts import PromptTemplate
|
4 |
from langchain.prompts.few_shot import FewShotPromptTemplate
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
import requests
|
6 |
import random
|
|
|
7 |
import openai
|
8 |
import re
|
9 |
+
import gradio as gr
|
10 |
|
11 |
+
"""# Space Implementation"""
|
12 |
+
|
13 |
+
clerkieExamples=["how do I use langchain?", "How do I create an agent with custom LLMChain?"]
|
14 |
|
15 |
def chat(message, history):
|
16 |
print(message)
|
|
|
40 |
def clear(arg):
|
41 |
return ""
|
42 |
|
43 |
+
with gr.Blocks(css=".gradio-container {background-color: #0d1116;}") as demo:
|
44 |
user_state=gr.State([])
|
45 |
+
gr.Markdown("""# Hi, I'm Clerkie π€""")
|
46 |
+
gr.Markdown("""I can help you get started / answer any question you have about the [Langchain: Build AI apps with LLMs](https://github.com/hwchase17/langchain). If I fail to answer your question, please email me @ [email protected], and I will make sure you get an answer within an hour.""")
|
47 |
+
gr.Markdown("""### Want some help handling support questions for your open source project/devtool/etc.? Let me know π [clerkie.co](https://clerkie.co/)""")
|
48 |
with gr.Row():
|
49 |
with gr.Column():
|
50 |
output = gr.Chatbot().style(color_map=("orange", "green"))
|
|
|
62 |
cache_examples=False,
|
63 |
)
|
64 |
if __name__ == "__main__":
|
65 |
+
demo.launch(debug=True, share=True)
|