martenl commited on
Commit
c520478
1 Parent(s): f3e83e8

Reformat file and add little gradio interface

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import torch
 
2
 
3
  a = torch.IntTensor([1, 2, 3])
4
  b = torch.IntTensor([4, 5, 6])
5
 
6
  m = a * b
7
  print(m.numpy())
 
 
 
 
 
 
 
 
 
1
  import torch
2
+ import gradio as gr
3
 
4
  a = torch.IntTensor([1, 2, 3])
5
  b = torch.IntTensor([4, 5, 6])
6
 
7
  m = a * b
8
  print(m.numpy())
9
+
10
+
11
+ def greet(name):
12
+ return "Hello " + name + "!!"
13
+
14
+
15
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
16
+ iface.launch()