Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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>
|
|
@@ -105,11 +105,12 @@ In this app, you can explore the outputs of a gpt-3.5-turbo LLM.
|
|
| 105 |
|
| 106 |
with gr.Blocks(css = """#col_container {width: 700px; margin-left: auto; margin-right: auto;}
|
| 107 |
#chatbot {height: 400px; overflow: auto;}""") as demo:
|
| 108 |
-
|
|
|
|
| 109 |
with gr.Column(elem_id = "col_container"):
|
| 110 |
-
openai_api_key = gr.Textbox(type='password', label="
|
| 111 |
-
chatbot = gr.Chatbot(elem_id='
|
| 112 |
-
inputs = gr.Textbox(placeholder= "
|
| 113 |
state = gr.State([]) #s
|
| 114 |
b1 = gr.Button()
|
| 115 |
|
|
|
|
| 91 |
def reset_textbox():
|
| 92 |
return gr.update(value='')
|
| 93 |
|
| 94 |
+
title = """<h1 align="center">🔥ChatGPT 3.5 🚀查特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>
|
|
|
|
| 105 |
|
| 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>输入apike秘钥即可运行,如无秘钥可加微信号:visjia购买20元一个</center>''')
|
| 110 |
with gr.Column(elem_id = "col_container"):
|
| 111 |
+
openai_api_key = gr.Textbox(type='password', label="请输入你的APIKEY秘钥")
|
| 112 |
+
chatbot = gr.Chatbot(elem_id='chatbot') #c
|
| 113 |
+
inputs = gr.Textbox(placeholder= "Hi there!", label= "请输入你的问题然后按 Run发送") #t
|
| 114 |
state = gr.State([]) #s
|
| 115 |
b1 = gr.Button()
|
| 116 |
|