jwalanthi commited on
Commit
6de72ef
·
1 Parent(s): 91dba4d
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1,12 +1,22 @@
1
  import gradio as gr
2
 
3
- def greet(name, intensity):
4
- return "Hello, " + name + "!" * int(intensity)
 
 
 
 
5
 
6
  demo = gr.Interface(
7
  fn=greet,
8
- inputs=["text", "slider"],
 
 
 
 
 
 
9
  outputs=["text"],
10
  )
11
 
12
- demo.launch(share=True)
 
1
  import gradio as gr
2
 
3
+ import numpy as np
4
+
5
+ def greet (word, sentence, model, layer, norm):
6
+ inputs = [word, sentence, model, str(layer), norm]
7
+ outputs = [input+'\t'+str(np.random.randint(0,100, size=1)[0]) for input in inputs]
8
+ return "\n".join(outputs)
9
 
10
  demo = gr.Interface(
11
  fn=greet,
12
+ inputs=[
13
+ "text",
14
+ "text",
15
+ gr.Radio(["bert", "gpt2"]),
16
+ "number",
17
+ gr.Radio(["Binder", "McRae", "Buchanan"]),
18
+ ],
19
  outputs=["text"],
20
  )
21
 
22
+ demo.launch()