ajwthompson commited on
Commit
9ad3866
·
1 Parent(s): 5317ee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -30,7 +30,8 @@ class ChatWrapper:
30
  ):
31
  """Execute the chat functionality."""
32
  self.lock.acquire()
33
- chain = set_openai_api_key('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')
 
34
  try:
35
  history = history or []
36
  # If chain is None, that is because no API key was provided.
@@ -63,7 +64,7 @@ def my_inference_function(name):
63
  return "Hello " + name + "!"
64
 
65
  gradio_interface = gr.Interface(chat, inputs=['text',state], outputs=['text', state])
66
- gradio_interface.launch()
67
 
68
 
69
 
 
30
  ):
31
  """Execute the chat functionality."""
32
  self.lock.acquire()
33
+ api_key = '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'
34
+ chain = set_openai_api_key(api_key)
35
  try:
36
  history = history or []
37
  # If chain is None, that is because no API key was provided.
 
64
  return "Hello " + name + "!"
65
 
66
  gradio_interface = gr.Interface(chat, inputs=['text',state], outputs=['text', state])
67
+ gradio_interface.launch(debug=True)
68
 
69
 
70