File size: 265 Bytes
49c9801
6961bab
 
 
49c9801
 
6961bab
49c9801
 
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr
import duckdb

db = duckdb.connect('test.db')

def greet(name):
    return "Hello " + name + "!! There are " + str(db.execute('show tables;').df().shape[0]) + ' tables' 

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()