# Sklearn - skops spaces run into timeout while deploying

**URL:** <https://discuss.huggingface.co/t/sklearn-skops-spaces-run-into-timeout-while-deploying/31588>\
**Category:** Spaces\
**Created:** [February 13, 2023, 8:02am UTC](https://discuss.huggingface.co/t/sklearn-skops-spaces-run-into-timeout-while-deploying/31588 "2023-02-13T08:02:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuhs](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@kuhs](https://discuss.huggingface.co/u/kuhs)\
**Post date:** [February 13, 2023, 8:02am UTC](https://discuss.huggingface.co/t/sklearn-skops-spaces-run-into-timeout-while-deploying/31588/1 "2023-02-13T08:02:29Z")

</div>

Hi

I’m trying to run a sklearn with the skops model with spaces. The models I tried top deploy run into an timeout. The same happens with the sample regression models from sklearn.

sklearn: [scikit-learn/passive-agressive-regressor · Hugging Face](https://huggingface.co/scikit-learn/passive-agressive-regressor)  
my space: [kuhs/my-awesome-model · Hugging Face](https://huggingface.co/kuhs/my-awesome-model)

I have tried running those on a payed plan, but with the same results.

Cheers  
Ben

Edit:  
The followowing error message is displayed

> [@Logs](#):
>
> ===== Application Startup at 2023-02-13 07:57:54 =====
> 
> Fetching model from: huggingface co/kuhs/my-awesome-model  
> Caching examples at: ‘/home/user/app/gradio\_cached\_examples/57’  
> Traceback (most recent call last):  
> File “app.py”, line 3, in   
> gr.Interface.load(“models/kuhs/my-awesome-model”).launch()  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/interface.py”, line 102, in load  
> return super().load(name=name, src=src, api\_key=api\_key, alias=alias, \*\*kwargs)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 1171, in load  
> return external.load\_blocks\_from\_repo(name, src, api\_key, alias, \*\*kwargs)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/external.py”, line 70, in load\_blocks\_from\_repo  
> blocks: gradio.Blocks = factory\_methods[src](name, api\_key, alias, \*\*kwargs)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/external.py”, line 365, in from\_model  
> interface = gradio.Interface(\*\*kwargs)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/interface.py”, line 484, in **init**  
> self.render\_examples()  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/interface.py”, line 785, in render\_examples  
> self.examples\_handler = Examples(  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py”, line 69, in create\_examples  
> utils.synchronize\_async(examples\_obj.create)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/utils.py”, line 420, in synchronize\_async  
> return fsspec.asyn.sync(fsspec.asyn.get\_loop(), func, \*args, \*\*kwargs)  
> File “/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py”, line 99, in sync  
> raise return\_result  
> File “/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py”, line 54, in \_runner  
> result[0] = await coro  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py”, line 273, in create  
> await self.cache()  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py”, line 308, in cache  
> prediction = await Context.root\_block.process\_api(  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 1017, in process\_api  
> result = await self.call\_function(  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 835, in call\_function  
> prediction = await anyio.to\_thread.run\_sync(  
> File “/home/user/.local/lib/python3.8/site-packages/anyio/to\_thread.py”, line 31, in run\_sync  
> return await get\_asynclib().run\_sync\_in\_worker\_thread(  
> File “/home/user/.local/lib/python3.8/site-packages/anyio/\_backends/\_asyncio.py”, line 937, in run\_sync\_in\_worker\_thread  
> return await future  
> File “/home/user/.local/lib/python3.8/site-packages/anyio/\_backends/\_asyncio.py”, line 867, in run  
> result = context.run(func, \*args)  
> File “/home/user/.local/lib/python3.8/site-packages/gradio/external.py”, line 331, in query\_huggingface\_api  
> raise ValueError(  
> ValueError: Could not complete request to HuggingFace API, Status Code: 504, Error: Model kuhs/my-awesome-model time out
