ajwthompson commited on
Commit
c74429f
·
1 Parent(s): ade681e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -50,8 +50,8 @@ class ChatWrapper:
50
  return history, history
51
 
52
  chat = ChatWrapper()
53
- state = gr.State()
54
- agent_state = gr.State(set_openai_api_key('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'))
55
  def echo(name, request: gr.Request):
56
  if request:
57
  print("Request headers dictionary:", request.headers)
@@ -62,7 +62,7 @@ def echo(name, request: gr.Request):
62
  def my_inference_function(name):
63
  return "Hello " + name + "!"
64
 
65
- gradio_interface = gr.Interface(chat, inputs=[openai_api_key_textbox, message, state, agent_state], outputs=[chatbot, state])
66
  gradio_interface.launch()
67
 
68
 
 
50
  return history, history
51
 
52
  chat = ChatWrapper()
53
+ state = gr.State(set_openai_api_key('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'))
54
+
55
  def echo(name, request: gr.Request):
56
  if request:
57
  print("Request headers dictionary:", request.headers)
 
62
  def my_inference_function(name):
63
  return "Hello " + name + "!"
64
 
65
+ gradio_interface = gr.Interface(chat, inputs=['text',state], outputs=[chatbot, state])
66
  gradio_interface.launch()
67
 
68