Spaces:
Build error
Build error
Update app.py
Browse files12 unmodified lines131415161718192021222320 unmodified lines44454647484950514 unmodified lines5657585960616212 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>"""PLACEHOLDER = """<center><p>Feel free to test models <b>without</b> any logs.</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 linestop_k = top_k,temperature = temperature,):print(resp)yield resp12 unmodified lines131415161718192021222320 unmodified lines444546474849504 unmodified lines55565758596012 unmodified linesTITLE = "<h1><center>internlm2.5-7b-chat</center></h1>"DESCRIPTION = f"""<h3>MODEL NOW: <a href="https://hf.co/{MODEL_ID}">{MODEL_NAME}</a></h3>"""PLACEHOLDER = """<center><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):for resp, history in model.stream_chat(tokenizer,query = message,4 unmodified linestop_k = top_k,temperature = temperature,):yield resp
app.py+3-5