Space won't start

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

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

2 Likes

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.

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

1 Like

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

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)

1 Like

Tunneling tool might be targeted for ban…

1 Like

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

1 Like

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