Q4234 commited on
Commit
711fde0
1 Parent(s): 996ab31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -2,8 +2,18 @@ import gradio as gr
2
 
3
  import ctransformers
4
 
5
- def greet(name):
6
- return "Hello " + name + "!!"
 
7
 
8
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
 
9
  iface.launch()
 
2
 
3
  import ctransformers
4
 
5
+ class Z(object):
6
+ def __init__(self):
7
+ pass
8
 
9
+ def init(self):
10
+ pass
11
+
12
+ def greet(name):
13
+ return f'Hi {name}'
14
+
15
+ z = Z()
16
+ z.init()
17
+
18
+ iface = gr.Interface(fn=z.greet, inputs="text", outputs="text")
19
  iface.launch()