Download app.py from Robsonfll/ArqueoIA: direct link, hf CLI and curl.
- Browser
- Download file 684 Bytes
-
https://huggingface.co/spaces/Robsonfll/ArqueoIA/resolve/main/app.py
- Command line
-
hf download hf://spaces/Robsonfll/ArqueoIA/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Robsonfll/ArqueoIA/resolve/main/app.py
684 Bytes
| import os | |
| os.environ["STREAMLIT_SERVER_PORT"] = "7860" | |
| os.environ["STREAMLIT_SERVER_ADDRESS"] = "0.0.0.0" | |
| import streamlit as st | |
| st.set_page_config(page_title="Teste upload", page_icon="🧪", layout="centered") | |
| st.title("Teste de Upload no Hugging Face") | |
| # 1) Checar se o XSRF está realmente desligado | |
| st.write("XSRF:", st.get_option("server.enableXsrfProtection")) | |
| # 2) File uploader mínimo | |
| file = st.file_uploader("Envie qualquer arquivo (JPG, PNG, PDF etc.)") | |
| if file is not None: | |
| data = file.getvalue() | |
| st.write({ | |
| "nome": file.name, | |
| "tamanho_bytes": len(data), | |
| "tipo": file.type, | |
| }) | |
| else: | |
| st.info("Nenhum arquivo enviado ainda.") | |