Skip to content

Commit 70ee586

Browse files
Replace iframe with external link to Hugging Face model page (#1203)
Embedding the GPT-2 model page from Hugging Face using an <iframe> was not working because the site sends security headers (X-Frame-Options: DENY / SAMEORIGIN) that prevent the page from being displayed inside external frames. As a result, the iframe rendered as a blank frame and produced a browser console error: Refused to display 'https://huggingface.co/' in a frame because it set 'X-Frame-Options' to 'deny'. This change removes the iframe and replaces it with a direct external link to the model page: https://huggingface.co/openai-community/gpt2 This ensures users can still access the model page without encountering embedding errors.
1 parent 5739145 commit 70ee586

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • chapters/en/chapter1

chapters/en/chapter1/6.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ Modern decoder-based LLMs have demonstrated impressive capabilities:
7878

7979
You can experiment with decoder-based LLMs directly in your browser via model repo pages on the Hub. Here's an example with the classic [GPT-2](https://huggingface.co/openai-community/gpt2) (OpenAI's finest open source model!):
8080

81-
<iframe
82-
src="https://huggingface.co/openai-community/gpt2"
83-
frameborder="0"
84-
width="100%"
85-
height="450"
86-
></iframe>
81+
<a
82+
href="https://huggingface.co/openai-community/gpt2" target="_blank">
83+
View GPT-2 model on Hugging Face
84+
</a>
8785

8886
## Sequence-to-sequence models[[sequence-to-sequence-models]]
8987

0 commit comments

Comments
 (0)