Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,18 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
import ctransformers
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|