Spaces:
Running on Zero
Running on Zero
zR commited on
Commit Β·
b694633
1
Parent(s): 995512e
token check
Browse files26 unmodified lines2728293031323345 unmodified lines7980818283849 unmodified lines94959697989910026 unmodified linesreturn False@spaces.GPU()def predict(history, prompt, max_length, top_p, temperature):stop = StopOnTokens()messages = []45 unmodified lines<a href="https://github.com/THUDM/LongWriter">π Github</a> |<a href="https://arxiv.org/pdf/2408.07055">π arxiv </a></div>""")chatbot = gr.Chatbot()9 unmodified linespBtn = gr.Button("Set Prompt")with gr.Column(scale=1):emptyBtn = gr.Button("Clear History")max_length = gr.Slider(0, 10000000, value=10000, step=1.0, label="Maximum length", interactive=True)top_p = gr.Slider(0, 1, value=0.8, step=0.01, label="Top P", interactive=True)temperature = gr.Slider(0.01, 1, value=0.6, step=0.01, label="Temperature", interactive=True)26 unmodified lines2728293031323345 unmodified lines7980818283848586879 unmodified lines97989910010110210326 unmodified linesreturn False@spaces.GPU(duration=120)def predict(history, prompt, max_length, top_p, temperature):stop = StopOnTokens()messages = []45 unmodified lines<a href="https://github.com/THUDM/LongWriter">π Github</a> |<a href="https://arxiv.org/pdf/2408.07055">π arxiv </a></div><div style="text-align: center; font-size: 15px; font-weight: bold; color: red; margin-bottom: 20px;">β οΈ This is just a basic demo. Due to the scheduling limitations of Zero GPU, the output length is restricted to under 4K. If you wish to experience the full capabilities of the model (output exceeding 10K), please deploy the model yourself. Thank you for your understanding.</div>""")chatbot = gr.Chatbot()9 unmodified linespBtn = gr.Button("Set Prompt")with gr.Column(scale=1):emptyBtn = gr.Button("Clear History")max_length = gr.Slider(0, 128000, value=4096, step=1.0, label="Maximum length(Input + Output)", interactive=True)top_p = gr.Slider(0, 1, value=0.8, step=0.01, label="Top P", interactive=True)temperature = gr.Slider(0.01, 1, value=0.6, step=0.01, label="Temperature", interactive=True)
app.py+5-2