Spaces:
Sleeping
Sleeping
File size: 805 Bytes
ba773b7 1908bcf 9a8796a 5018a50 ba773b7 5018a50 ba773b7 5018a50 ba773b7 5018a50 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import gradio as gr
import types
# Create a local "transformers_gradio" object to mimic the missing package
transformers_gradio = types.SimpleNamespace(registry="huggingface")
# Load Gradio interfaces with the appropriate registry
demo_distill = gr.load(name="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", src=transformers_gradio.registry)
demo_r1 = gr.load(name="deepseek-ai/DeepSeek-R1", src=transformers_gradio.registry)
demo_zero = gr.load(name="deepseek-ai/DeepSeek-R1-Zero", src=transformers_gradio.registry)
# Example usage: Assign one of the models as the default demo
demo = demo_distill
# Add functionality to demo
if hasattr(demo, "fn"):
demo.fn = demo.fn
if hasattr(demo, "fns"):
for fn in demo.fns.values():
fn.api_name = False
if __name__ == "__main__":
demo.launch()
|