Spaces:
Sleeping
Sleeping
Update app.py
Browse files32 unmodified lines333435363738394041424344454647484950515253363738394032 unmodified lines x = 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 component 0.91, # float, representing input in 'Top-p (nucleus sampling)' Slider component 40, # int, representing input in 'Top-k (nucleus sampling)' Slider component 0.65, # float, representing input in 'Temperature' Slider component 20, # int, representing input in 'Max New Tokens' Slider component 1.2, # float, representing input in 'repetition_penalty' Slider component fn_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)
output = "Hello?" return output
with gr.Blocks() as demo:app.py+2-18