File size: 696 Bytes
7d1c38d a343a09 7d1c38d 80aab33 d35b85a 80aab33 d35b85a a343a09 d35b85a a343a09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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) |