Commit
·
f6cc1d7
1
Parent(s):
936abfc
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,8 @@ class ChatWrapper:
|
|
48 |
return history, history
|
49 |
|
50 |
chat = ChatWrapper()
|
51 |
-
|
|
|
52 |
def echo(name, request: gr.Request):
|
53 |
if request:
|
54 |
print("Request headers dictionary:", request.headers)
|
@@ -61,7 +62,7 @@ def my_inference_function(name):
|
|
61 |
|
62 |
gradio_interface = gr.Interface(
|
63 |
fn = chat,
|
64 |
-
inputs =
|
65 |
outputs = "text"
|
66 |
)
|
67 |
gradio_interface.launch()
|
|
|
48 |
return history, history
|
49 |
|
50 |
chat = ChatWrapper()
|
51 |
+
state = gr.State()
|
52 |
+
agent_state = gr.State()
|
53 |
def echo(name, request: gr.Request):
|
54 |
if request:
|
55 |
print("Request headers dictionary:", request.headers)
|
|
|
62 |
|
63 |
gradio_interface = gr.Interface(
|
64 |
fn = chat,
|
65 |
+
inputs = [openai_api_key_textbox, message, state, agent_state],
|
66 |
outputs = "text"
|
67 |
)
|
68 |
gradio_interface.launch()
|