visjia commited on
Commit
de857f8
·
1 Parent(s): 9f1ec1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -91,7 +91,7 @@ def predict(inputs, top_p, temperature, openai_api_key, chat_counter, chatbot=[]
91
  def reset_textbox():
92
  return gr.update(value='')
93
 
94
- title = """<h1 align="center">🔥ChatGPT API 🚀Streaming🚀</h1>"""
95
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
96
  ```
97
  User: <utterance>
@@ -106,11 +106,11 @@ In this app, you can explore the outputs of a gpt-3.5-turbo LLM.
106
  with gr.Blocks(css = """#col_container {width: 700px; margin-left: auto; margin-right: auto;}
107
  #chatbot {height: 400px; overflow: auto;}""") as demo:
108
  gr.HTML(title)
109
- gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPTwithAPI?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
110
  with gr.Column(elem_id = "col_container"):
111
- openai_api_key = gr.Textbox(type='password', label="Enter your OpenAI API key here")
112
- chatbot = gr.Chatbot(elem_id='chatbot') #c
113
- inputs = gr.Textbox(placeholder= "Hi there!", label= "Type an input and press Enter") #t
114
  state = gr.State([]) #s
115
  b1 = gr.Button()
116
 
 
91
  def reset_textbox():
92
  return gr.update(value='')
93
 
94
+ title = """<h1 align="center">🔥ChatGPT API 🚀查特AI🚀</h1>"""
95
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
96
  ```
97
  User: <utterance>
 
106
  with gr.Blocks(css = """#col_container {width: 700px; margin-left: auto; margin-right: auto;}
107
  #chatbot {height: 400px; overflow: auto;}""") as demo:
108
  gr.HTML(title)
109
+ gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPTwithAPI?duplicate=true"></a>输入apike秘钥即可运行,如无秘钥可加微信号:visjia购买20元一个</center>''')
110
  with gr.Column(elem_id = "col_container"):
111
+ openai_api_key = gr.Textbox(type='password', label="在此处输入您的 OpenAI API 密钥")
112
+ chatbot = gr.Chatbot(elem_id='查特AI') #c
113
+ inputs = gr.Textbox(placeholder= "无所不知!", label= "输入你的问题并按 发送") #t
114
  state = gr.State([]) #s
115
  b1 = gr.Button()
116