# Panel Data APP - GPT2 Show Case

**URL:** <https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212>\
**Category:** 🤗Transformers\
**Created:** [October 30, 2021, 7:14am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212 "2021-10-30T07:14:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [October 30, 2021, 7:14am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/1 "2021-10-30T07:14:34Z")

</div>

A user of Panel asked for help creating a data app based on the GPT2 transformer and bokeh plots [Not able to update Bokeh bar plot based on button click which updates source.data - Panel - HoloViz Discourse](https://discourse.holoviz.org/t/not-able-to-update-bokeh-bar-plot-based-on-button-click-which-updates-source-data/3009).

I took up the challenge and in an hour I had created this. I can only agree with the prediction 🙂

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/a/a6d9efade29e509a93ab11643756facda77d2a91.png)

Check out the code [Hugging Face GPT2 Transformer Example · GitHub](https://gist.github.com/MarcSkovMadsen/eae998fbcb299fae9e92ab0089e7eff8).

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [October 30, 2021, 7:15am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/2 "2021-10-30T07:15:21Z")

</div>

Does any one know if I can host the app on _spaces_?

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](https://discuss.huggingface.co/u/sgugger)\
**Post date:** [October 31, 2021, 3:34pm UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/3 "2021-10-31T15:34:24Z")

</div>

You can ask to join the beta [here](https://huggingface.co/spaces) I believe!

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [April 24, 2022, 4:10am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/4 "2022-04-24T04:10:58Z")

</div>

Inspired by [Deploy on Hugging Face - Mercury Docs (mercury-docs.readthedocs.io)](https://mercury-docs.readthedocs.io/en/latest/deploy/hugging-face-spaces/)I tried to deploy a Panel app in hugging face spaces.

But I cannot get it working. I cannot create the web socket connection.

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/8/8fbb2f1a0ee3d42797217f629cad1532233d2647.png)

The logs look like

```bash
2022-04-23 21:03:54,107 400 GET /ws (172.30.0.55) 0.47ms
2022-04-23 22:18:25,800 400 GET /ws (172.30.0.55) 0.47ms
2022-04-24 02:25:40,290 400 GET /ws (172.30.0.55) 0.47ms
2022-04-24 02:25:53,151 400 GET /ws (172.30.0.55) 0.47ms
2022-04-24 02:25:57,850 400 GET /ws (172.30.0.55) 0.47ms
2022-04-24 02:27:02,606 400 GET /ws (172.30.0.55) 0.47ms
2022-04-24 02:47:30,119 400 GET /ws (172.30.0.55) 0.52ms
2022-04-24 03:34:12,633 400 GET /ws (172.30.0.55) 0.58ms
2022-04-24 03:48:38,858 400 GET /ws (172.30.0.55) 0.47ms

```

For more details see my space [Awesome Panel - a Hugging Face Space by MarcSkovMadsen](https://huggingface.co/spaces/MarcSkovMadsen/awesome-panel)

**How do I solve this?**

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [April 24, 2022, 4:24am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/5 "2022-04-24T04:24:19Z")

</div>

Cross posted to [How do I get my Panel App deployed on Hugging Face - Panel - HoloViz Discourse](https://discourse.holoviz.org/t/how-do-i-get-my-panel-app-deployed-on-hugging-face/3621)

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [September 17, 2022, 6:40pm UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/6 "2022-09-17T18:40:28Z")

</div>

My guess is that the issue the iframe link to the app [https://hf.space/embed/MarcSkovMadsen/awesome-panel/+…](https://t.co/IJJmyjVTDf) makes the app request the web socket connection in the wrong place wss://hf.space/embed/MarcSkovMadsen/awesome-panel/+/ws?

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/b/b2eee12a932e2ece075b2ed56d77027f2225ddd5.png)

But I don’t know if it is the cause. And I don’t know how to fix it.

Any help is really appreciated.

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [September 17, 2022, 6:46pm UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/7 "2022-09-17T18:46:40Z")

</div>

If you are interested in helping fix the issue then check out.

## Resources

- Space: [MarcSkovMadsen/awesome-panel](https://huggingface.co/spaces/MarcSkovMadsen/awesome-panel)
- Deployed App: [https://hf.space/embed/MarcSkovMadsen/awesome-panel/+](https://hf.space/embed/MarcSkovMadsen/awesome-panel/+)

---

<div class="post-metadata">

**Author:** ![MarcSkovMadsen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcskovmadsen/32/3001_2.png) [@MarcSkovMadsen](https://discuss.huggingface.co/u/MarcSkovMadsen)\
**Post date:** [November 23, 2022, 7:41am UTC](https://discuss.huggingface.co/t/panel-data-app-gpt2-show-case/11212/8 "2022-11-23T07:41:49Z")

</div>

Fixed and works now.

Check out [Awesome Panel - a Hugging Face Space by MarcSkovMadsen](https://huggingface.co/spaces/MarcSkovMadsen/awesome-panel)
