Spaces:
Sleeping
Sleeping
Update app.py
Browse files43 unmodified lines444546474848495051527 unmodified lines6061626263646543 unmodified lines def chat(x): x = f"{x}" x = x.replace('friend','Human').replace('you','Assistant') result = gradio_client.predict( x.replace('friend','Human').replace('you','Assistant'), x, # str representing input in 'User input' Textbox component 0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component 40, # int, representing input in 'Top-k (nucleus sampling)' Slider component7 unmodified lines output = re.sub('νν','γ
γ
', output) output = output.split('λ')[0] output = output.split('<|endoftext|>')[0] output = output.split('\n')[0] output = re.sub('[=+#/\:@*\"β»γγβ|\\\<\>\(\)\[\]`\'β¦γ\β\β\βΒ·]', ' ', output) output = re.sub('[a-zA-Z]',' ',output)
app.py+2-2