Spaces:
Build error
Build error
Update app.py
Browse files12 unmodified lines1314151616171819202021222320 unmodified lines4445464748474849504 unmodified lines5556575958596012 unmodified linesTITLE = "<h1><center>internlm2.5-7b-chat</center></h1>"
DESCRIPTION = f"""<h3>MODEL: <a href="https://hf.co/{MODEL_ID}">{MODEL_NAME}</a></h3><h3>MODEL NOW: <a href="https://hf.co/{MODEL_ID}">{MODEL_NAME}</a></h3>"""PLACEHOLDER = """<center><p>Feel free to test models <b>without</b> any logs.</p><p>InternLM2.5 has open-sourced a 7 billion parameter base model<br> and a chat model tailored for practical scenarios.</p></center>"""
20 unmodified lines
@spaces.GPU()def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float): print(history)
for resp, history in model.stream_chat( tokenizer, query = message,4 unmodified lines top_k = top_k, temperature = temperature, ): print(resp) yield resp
app.py+3-5