Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import json
|
|
@@ -92,7 +129,7 @@ def predict(inputs, top_p, temperature, openai_api_key, chat_counter, chatbot=[]
|
|
| 92 |
def reset_textbox():
|
| 93 |
return gr.update(value='')
|
| 94 |
|
| 95 |
-
title = """<h1 align="center">🔥ChatGPT API
|
| 96 |
description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
|
| 97 |
```
|
| 98 |
User: <utterance>
|
|
@@ -129,4 +166,5 @@ with gr.Blocks(css = """#col_container {width: 1000px; margin-left: auto; margin
|
|
| 129 |
inputs.submit(reset_textbox, [], [inputs])
|
| 130 |
|
| 131 |
#gr.Markdown(description)
|
| 132 |
-
demo.queue().launch(debug=True)
|
|
|
|
|
|
| 1 |
+
Hugging Face's logo
|
| 2 |
+
Hugging Face
|
| 3 |
+
Search models, datasets, users...
|
| 4 |
+
Models
|
| 5 |
+
Datasets
|
| 6 |
+
Spaces
|
| 7 |
+
Docs
|
| 8 |
+
Solutions
|
| 9 |
+
Pricing
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
Spaces:
|
| 14 |
+
|
| 15 |
+
zjhcr
|
| 16 |
+
/
|
| 17 |
+
ChatGPTwithAPI Copied
|
| 18 |
+
like
|
| 19 |
+
0
|
| 20 |
+
App
|
| 21 |
+
Files and versions
|
| 22 |
+
Community
|
| 23 |
+
ChatGPTwithAPI
|
| 24 |
+
/
|
| 25 |
+
app.py
|
| 26 |
+
zjhcr's picture
|
| 27 |
+
zjhcr
|
| 28 |
+
Duplicate from ysharma/ChatGPTwithAPI
|
| 29 |
+
659118f
|
| 30 |
+
about 10 hours ago
|
| 31 |
+
raw
|
| 32 |
+
history
|
| 33 |
+
blame
|
| 34 |
+
contribute
|
| 35 |
+
delete
|
| 36 |
+
No virus
|
| 37 |
+
5.37 kB
|
| 38 |
import gradio as gr
|
| 39 |
import os
|
| 40 |
import json
|
|
|
|
| 129 |
def reset_textbox():
|
| 130 |
return gr.update(value='')
|
| 131 |
|
| 132 |
+
title = """<h1 align="center">🔥ChatGPT API 🚀Streaming🚀</h1>"""
|
| 133 |
description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
|
| 134 |
```
|
| 135 |
User: <utterance>
|
|
|
|
| 166 |
inputs.submit(reset_textbox, [], [inputs])
|
| 167 |
|
| 168 |
#gr.Markdown(description)
|
| 169 |
+
demo.queue().launch(debug=True)
|
| 170 |
+
|