Spaces:
Runtime error
Runtime error
Commit
·
c67779b
1
Parent(s):
1b56767
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,14 @@ except: from config import proxies, WEB_PORT
|
|
| 9 |
PORT = find_free_port() if WEB_PORT <= 0 else WEB_PORT
|
| 10 |
|
| 11 |
initial_prompt = "Serve me as a writing and programming assistant."
|
| 12 |
-
title_html = """<h1 align="center">ChatGPT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
import logging
|
| 15 |
os.makedirs('gpt_log', exist_ok=True)
|
|
@@ -59,6 +66,8 @@ with gr.Blocks() as demo:
|
|
| 59 |
top_p = gr.Slider(minimum=-0, maximum=1.0, value=1.0, step=0.01,interactive=True, label="Top-p (nucleus sampling)",)
|
| 60 |
temperature = gr.Slider(minimum=-0, maximum=5.0, value=1.0, step=0.01, interactive=True, label="Temperature",)
|
| 61 |
|
|
|
|
|
|
|
| 62 |
txt.submit(predict, [api, txt, top_p, temperature, chatbot, history, systemPromptTxt], [chatbot, history, statusDisplay])
|
| 63 |
submitBtn.click(predict, [api, txt, top_p, temperature, chatbot, history, systemPromptTxt], [chatbot, history, statusDisplay], show_progress=True)
|
| 64 |
for k in functional:
|
|
|
|
| 9 |
PORT = find_free_port() if WEB_PORT <= 0 else WEB_PORT
|
| 10 |
|
| 11 |
initial_prompt = "Serve me as a writing and programming assistant."
|
| 12 |
+
title_html = """<h1 align="center">ChatGPT 学术优化</h1>"""
|
| 13 |
+
|
| 14 |
+
description = """<div align=center>
|
| 15 |
+
|
| 16 |
+
本项目参考自[chatgpt_academic](https://github.com/binary-husky/chatgpt_academic)
|
| 17 |
+
|
| 18 |
+
</div>
|
| 19 |
+
"""
|
| 20 |
|
| 21 |
import logging
|
| 22 |
os.makedirs('gpt_log', exist_ok=True)
|
|
|
|
| 66 |
top_p = gr.Slider(minimum=-0, maximum=1.0, value=1.0, step=0.01,interactive=True, label="Top-p (nucleus sampling)",)
|
| 67 |
temperature = gr.Slider(minimum=-0, maximum=5.0, value=1.0, step=0.01, interactive=True, label="Temperature",)
|
| 68 |
|
| 69 |
+
gr.Markdown(description)
|
| 70 |
+
|
| 71 |
txt.submit(predict, [api, txt, top_p, temperature, chatbot, history, systemPromptTxt], [chatbot, history, statusDisplay])
|
| 72 |
submitBtn.click(predict, [api, txt, top_p, temperature, chatbot, history, systemPromptTxt], [chatbot, history, statusDisplay], show_progress=True)
|
| 73 |
for k in functional:
|