Spaces:
Sleeping
Sleeping
Update app.py
Browse files32 unmodified lines33343536373839404142434445464748495051525354555632 unmodified linesx = f"[***๋๋ Assistant์ ๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***]\nHuman: {x}\n\n###\nAssistant:"print("\n___________________\n" + f"{x}")result = gradio_client.predict(x,# str representing input in 'User input' Textbox component0.91, # float, representing input in 'Top-p (nucleus sampling)' Slider component40, # int, representing input in 'Top-k (nucleus sampling)' Slider component0.65, # float, representing input in 'Temperature' Slider component20, # int, representing input in 'Max New Tokens' Slider component1.2, # float, representing input in 'repetition_penalty' Slider componentfn_index=0)result = str(result)output = result[len(x.rsplit(':', 1)[0])+2:]output = re.sub('ํํ','ใ ใ ', output)output = output.split('๋')[0]output = output.split('endoftext')[0]output = re.sub('[=+#/\:@*\"โปใใโ|\\\<\>\(\)\[\]`\'โฆใ\โ\โ\โยท]', '', output)#output = re.sub('[a-zA-Z]',' ',output)return outputwith gr.Blocks() as demo:32 unmodified lines333435363738394032 unmodified linesx = f"[***๋๋ Assistant์ ๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***]\nHuman: {x}\n\n###\nAssistant:"print("\n___________________\n" + f"{x}")output = "Hello?"return outputwith gr.Blocks() as demo:
app.py+2-18