File size: 268 Bytes
8d928e8
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
import shutil

def test_fn(img_path):
    print("Received path:", img_path)
    return img_path

demo = gr.Interface(fn=test_fn, inputs=gr.Image(type="filepath"), outputs="text")
if __name__ == "__main__":
    demo.launch(prevent_thread_lock=True)