| import random | |
| import gradio as gr | |
| def response(message, history): | |
| if "εοΌ" in message: | |
| response_text_tmp = message.replace("εοΌ", "!") | |
| if "ζ" in response_text_tmp: | |
| response_text = response_text_tmp.replace("ζ", "δ½ ") | |
| else: | |
| response_text=response_text_tmp | |
| else: | |
| responses = ["I'm not sure.", "Interesting.", "Tell me more!"] | |
| response_text = random.choice(responses) | |
| return response_text | |
| demo = gr.ChatInterface( | |
| response, | |
| title="Please Ask Me", | |
| description="Only the Yes-no question with εοΌ, can I give u certain answer!", | |
| ) | |
| demo.launch() | |