Spaces:
Sleeping
Sleeping
Update app.py
Browse files43 unmodified lines44454647484950517 unmodified lines5960616263646543 unmodified linesdef chat(x):x = f"{x}"result = gradio_client.predict(x.replace('friend','Human').replace('you','Assistant'),# str representing input in 'User input' Textbox component0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component40, # int, representing input in 'Top-k (nucleus sampling)' Slider component7 unmodified linesoutput = 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)43 unmodified lines4445464748495051527 unmodified lines60616263646543 unmodified linesdef chat(x):x = f"{x}"x = x.replace('friend','Human').replace('you','Assistant')result = gradio_client.predict(x,# str representing input in 'User input' Textbox component0.92, # float, representing input in 'Top-p (nucleus sampling)' Slider component40, # int, representing input in 'Top-k (nucleus sampling)' Slider component7 unmodified linesoutput = re.sub('νν','γ γ ', output)output = output.split('λ')[0]output = output.split('<|endoftext|>')[0]output = re.sub('[=+#/\:@*\"β»γγβ|\\\<\>\(\)\[\]`\'β¦γ\β\β\βΒ·]', ' ', output)output = re.sub('[a-zA-Z]',' ',output)
app.py+2-2