| import gradio as gr | |
| from function import go | |
| h = 1 | |
| r = 0 | |
| a = 1 | |
| def predict(house, rock, attr): | |
| result = go(h, r, a) | |
| if result == 1: | |
| return "Ты мне нравишься 💖" | |
| else: | |
| return "Созвонимся 📞" | |
| demo = gr.Interface(fn=predict, | |
| inputs=[gr.Number(label="house", value=1), | |
| gr.Number(label="rock", value=0), | |
| gr.Number(label="attr", value=1)], | |
| outputs='text', | |
| title='Моя нейросеть', | |
| description="Введите параметры и узнайте ответ") | |
| demo.launch(share=True) | |
| if __name__=='__main__': | |
| demo.launch(share=True) |