# Space won't start

**URL:** <https://discuss.huggingface.co/t/space-wont-start/133209>\
**Category:** Beginners\
**Created:** [December 27, 2024, 9:12am UTC](https://discuss.huggingface.co/t/space-wont-start/133209 "2024-12-27T09:12:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![IoannisKat1](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@IoannisKat1](https://discuss.huggingface.co/u/IoannisKat1)\
**Post date:** [December 27, 2024, 9:12am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/1 "2024-12-27T09:12:40Z")

</div>

So I made some code changes in my HuggingFace space today. After working for some seconds, i got the following error:

 ![Screenshot 2024-12-27 105709](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/7/e7955568e640e46a3045911a98ebb2c265d161d4.png)

Any idea how to fix this? My space won’t restart and does not give any errors in order to see whats wrong in the logs. Thank you for your time

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [December 27, 2024, 9:15am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/2 "2024-12-27T09:15:50Z")

</div>

In many cases, the HF space is operated in a way where the main program runs as a server process and the GUI accesses it. If the server process crashes, I think that error will occur. The cause is various, but it is when you use up all the RAM, including the virtual RAM.  
However, there is also the possibility of a new HF bug.

---

<div class="post-metadata">

**Author:** ![IoannisKat1](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@IoannisKat1](https://discuss.huggingface.co/u/IoannisKat1)\
**Post date:** [December 27, 2024, 9:24am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/3 "2024-12-27T09:24:03Z")

</div>

Ok. I’ll have that in mind. I will try to recreate the issue just to make sure

---

<div class="post-metadata">

**Author:** ![IoannisKat1](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@IoannisKat1](https://discuss.huggingface.co/u/IoannisKat1)\
**Post date:** [December 27, 2024, 9:50am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/4 "2024-12-27T09:50:44Z")

</div>

Small update. I created a new space in order to test this. It worked the first time. I deleted a line of code and then it got stuck in the building process. I tried a restart and the same thing occured. No logs were provided either.

![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/f/4f5f9333708eb1659b6cefff09f5864e5a50c0df.png)

Here’s the code in the app.py file:

from pyngrok import ngrok  
import gradio as gr

def generate\_response(instruction):  
“”“Generates a response using your fine-tuned model.”“”  
##FastLanguageModel.for\_inference(model) # Enable native 2x faster inference within the function  
prompt = f"“”### Instruction:  
Answer the provided question with the knowledge provided to you  
####### Question:  
{instruction}  
####### Answer:  
“”"  
return prompt

def greet(user\_question):  
response = generate\_response(user\_question)  
return f"{response}!"

####### Create a Gradio interface with text input and output  
gr.Interface(fn=greet, inputs=“text”, outputs=“text”).launch(share=True,debug=True)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [December 27, 2024, 9:55am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/5 "2024-12-27T09:55:46Z")

</div>

Tunneling tool might be targeted for ban…

---

<div class="post-metadata">

**Author:** ![IoannisKat1](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@IoannisKat1](https://discuss.huggingface.co/u/IoannisKat1)\
**Post date:** [December 27, 2024, 10:38am UTC](https://discuss.huggingface.co/t/space-wont-start/133209/6 "2024-12-27T10:38:41Z")

</div>

So the deletion of the ngrok library from the requirements and app files solved the issue. This is suprising to me because it worked before with that. Thanks nonetheless

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [December 27, 2024, 10:38pm UTC](https://discuss.huggingface.co/t/space-wont-start/133209/7 "2024-12-27T22:38:59Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
