# Connection timed out error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-timed-out-error%2F43685%3E%5C
**Category:** Spaces\
**Created:** [June 18, 2023, 10:32am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-timed-out-error%2F43685 "2023-06-18T10:32:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xelpmocAI](https://avatars.discourse-cdn.com/v4/letter/x/b9bd4f/32.png) [@xelpmocAI](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FxelpmocAI)%5C
**Post date:** [June 18, 2023, 10:32am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-timed-out-error%2F43685%2F1 "2023-06-18T10:32:24Z")

</div>

```auto
with gr.Blocks() as demo:
  with gr.Row():
    with gr.Column():
        file_input = gr.File(file_count="multiple", file_types=["text", ".json", ".csv", ".pdf"], type= 'binary')
        initiate_btn = gr.Button(value="Generate Embedding")

    with gr.Column():
        question = gr.Textbox(label="Question")
        question_btn = gr.Button(value="Question_btn")
        answer = gr.Textbox(label="answer")

  initiate_btn.click(embed_documents, inputs=file_input, api_name="embed-file")

  question_btn.click(retrieve_documents, inputs=question , outputs=answer, api_name="llm")

demo.launch(debug= True)

```

I have this code that is giving a **connection timed-out error** after I upload one single file.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [June 19, 2023, 10:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-timed-out-error%2F43685%2F2 "2023-06-19T22:38:04Z")

</div>

hi @xelpmocAI  
are you running this project on Spaces, would you mind sharing a public link?

---

<div class="post-metadata">

**Author:** ![xelpmocAI](https://avatars.discourse-cdn.com/v4/letter/x/b9bd4f/32.png) [@xelpmocAI](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FxelpmocAI)%5C
**Post date:** [June 20, 2023, 4:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-timed-out-error%2F43685%2F3 "2023-06-20T04:25:40Z")

</div>

Public Link -: [Xelpmoc PT - a Hugging Face Space by xelpmocAI](https://huggingface.co/spaces/xelpmocAI/xelpmoc-PT)

Currently running on CPU but I want it to run on GPU. I tried running this on colab, it works there. But fails to work here.
