A newer version of the Gradio SDK is available: 6.20.0
Hugging Face migration notes
This repository was pulled from:
- source Space:
https://huggingface.co/spaces/ChemFM/MaterialInverseDesignDemo
Target destination:
- destination org:
https://huggingface.co/aim4composites
What changed for GPU hosting
- README front matter now recommends
suggested_hardware: t4-small spacesis kept inrequirements.txtso ZeroGPU can allocate GPU time through@spaces.GPU- the app text now describes the Space as compatible with both ZeroGPU and dedicated GPU hardware
- runtime knobs were added so the thermoforming step can be tuned without code edits:
MG_DEFAULT_N_GENERATEMG_MAX_GENERATEMG_THERMO_RESTARTSMG_THERMO_EPOCHS
Recommended Hugging Face Space settings
- Create a new Gradio Space under
aim4composites. - Push this repository to that new Space.
- In the Space hardware settings, choose either ZeroGPU or
Nvidia T4 small. - Leave storage at the default unless larger artifacts are added later.
- Restart the Space and verify generation completes. On
Nvidia T4 small, logs should show CUDA is available. On ZeroGPU, CUDA is allocated when the decorated generation function runs.
Suggested first validation pass
- Open the Space and load the default test condition.
- Run material inverse design with the default
3candidates. - Select the top-ranked design.
- Run thermoforming once with a small target example.
- Confirm:
- the app starts successfully
- candidate generation completes
- thermoforming completes
- no out-of-memory or timeout errors appear in the logs
Optional runtime tuning if the Space feels slow
Set these Space variables:
MG_DEFAULT_N_GENERATE=2MG_MAX_GENERATE=4MG_THERMO_RESTARTS=6MG_THERMO_EPOCHS=300
If runtime remains comfortably fast, increase these gradually.