Spaces:
Runtime error
Runtime error
Download test/test_refresh.py from zej97/AI-Research-Assistant: direct link, hf CLI and curl.
- Browser
- Download file 245 Bytes
-
https://huggingface.co/spaces/zej97/AI-Research-Assistant/resolve/main/test/test_refresh.py
- Command line
-
hf download hf://spaces/zej97/AI-Research-Assistant/test/test_refresh.py
-
curl -L -o test_refresh.py https://huggingface.co/spaces/zej97/AI-Research-Assistant/resolve/main/test/test_refresh.py
245 Bytes
| import gradio as gr | |
| import time | |
| def get_time(): | |
| return time.ctime() | |
| md = gr.Markdown(get_time) | |
| def refresh(): | |
| print("refresh") | |
| md.update() | |
| return md.value | |
| iface = gr.Interface(fn=refresh, inputs=[], outputs=md) | |
| iface.launch() |