# models.py import gradio as gr import spaces import types # Create a local "transformers_gradio" object to mimic the missing package transformers_gradio = types.SimpleNamespace(registry="huggingface") # Now the gradio.load calls will work as if we had `import transformers_gradio` demo = gr.load(name="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", src=transformers_gradio.registry) demo = gr.load(name="deepseek-ai/DeepSeek-R1", src=transformers_gradio.registry) demo = gr.load(name="deepseek-ai/DeepSeek-R1-Zero", src=transformers_gradio.registry) # Example of using spaces (assuming `spaces.GPU()` is valid in your environment) demo.fn = spaces.GPU()(demo.fn) for fn in demo.fns.values(): fn.api_name = False if __name__ == "__main__": demo.launch()