ShermanAI commited on
Commit
792173c
·
1 Parent(s): 517a606

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import subprocess
2
  subprocess.check_call(["pip", "install", "-q", "gradio", "transformers", "python-dotenv"])
3
  subprocess.check_call(["pip", "install", "-q", "openai"])
4
- import subprocess
5
  import gradio as gr
6
  from transformers import TFAutoModelForCausalLM, AutoTokenizer
7
  import openai
@@ -37,11 +36,11 @@ def chatbot(input, history=[]):
37
  # define Gradio interface
38
  inputs = [
39
  gr.inputs.Textbox(label="Input"),
40
- gr.inputs.Hidden(label="Chat history", default=[])
41
  ]
42
  outputs = [
43
  gr.outputs.Textbox(label="Output"),
44
- gr.outputs.Hidden(label="Updated chat history")
45
  ]
46
 
47
  iface = gr.Interface(fn=chatbot,
 
1
  import subprocess
2
  subprocess.check_call(["pip", "install", "-q", "gradio", "transformers", "python-dotenv"])
3
  subprocess.check_call(["pip", "install", "-q", "openai"])
 
4
  import gradio as gr
5
  from transformers import TFAutoModelForCausalLM, AutoTokenizer
6
  import openai
 
36
  # define Gradio interface
37
  inputs = [
38
  gr.inputs.Textbox(label="Input"),
39
+ gr.outputs.Label(type="hidden", label="Chat history", default=[])
40
  ]
41
  outputs = [
42
  gr.outputs.Textbox(label="Output"),
43
+ gr.outputs.Label(type="hidden", label="Updated chat history")
44
  ]
45
 
46
  iface = gr.Interface(fn=chatbot,