Spaces:
Runtime error
Runtime error
# 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.") | |