Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import numpy as np | |
| def greet (word, sentence, model, layer, norm): | |
| inputs = [word, sentence, model, str(layer), norm] | |
| outputs = [input+'\t'+str(np.random.randint(0,100, size=1)[0]) for input in inputs] | |
| return "\n".join(outputs) | |
| demo = gr.Interface( | |
| fn=greet, | |
| inputs=[ | |
| "text", | |
| "text", | |
| gr.Radio(["bert", "gpt2"]), | |
| "number", | |
| gr.Radio(["Binder", "McRae", "Buchanan"]), | |
| ], | |
| outputs=["text"], | |
| ) | |
| demo.launch() |