Spaces:
Runtime error
Runtime error
File size: 511 Bytes
162943d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# install
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
try:
os.system("bash install.sh")
except Exception as e:
print(e)
# running
import gradio as gr
def image_classifier(inp):
return {'cat': 0.3, 'dog': 0.7}
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
demo.launch(auth=("[email protected]", "icon_2022"),
auth_message="Register at icon.is.tue.mpg.de/download to get the username and password.")
|