Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ YOUR_WORK_HTML = """
|
|
| 52 |
"""
|
| 53 |
|
| 54 |
# ---- Hugging Face reference content ----
|
| 55 |
-
HF_REFERENCE_HTML = """
|
| 56 |
<div id="hf-content" style="max-width: 800px; margin: auto; font-size: 16px; line-height: 1.6;">
|
| 57 |
{IMAGE_HTML}
|
| 58 |
<h1>Text Generation (Hugging Face Reference)</h1>
|
|
@@ -140,8 +140,7 @@ generator("Hello, I'm a language model,", max_length=30, num_return_sequences=3)
|
|
| 140 |
Text-to-Text generation models have a separate pipeline called text2text-generation.
|
| 141 |
This pipeline takes an input containing the sentence including the task and returns the output of the accomplished task.
|
| 142 |
<p>
|
| 143 |
-
|
| 144 |
-
<pre style="background: #f5f5f5; padding: 15px; border-radius: 5px; overflow-x: auto;">
|
| 145 |
from transformers import pipeline
|
| 146 |
|
| 147 |
text2text_generator = pipeline("text2text-generation")
|
|
|
|
| 52 |
"""
|
| 53 |
|
| 54 |
# ---- Hugging Face reference content ----
|
| 55 |
+
HF_REFERENCE_HTML = f"""
|
| 56 |
<div id="hf-content" style="max-width: 800px; margin: auto; font-size: 16px; line-height: 1.6;">
|
| 57 |
{IMAGE_HTML}
|
| 58 |
<h1>Text Generation (Hugging Face Reference)</h1>
|
|
|
|
| 140 |
Text-to-Text generation models have a separate pipeline called text2text-generation.
|
| 141 |
This pipeline takes an input containing the sentence including the task and returns the output of the accomplished task.
|
| 142 |
<p>
|
| 143 |
+
""" + """<pre style="background: #f5f5f5; padding: 15px; border-radius: 5px; overflow-x: auto;">
|
|
|
|
| 144 |
from transformers import pipeline
|
| 145 |
|
| 146 |
text2text_generator = pipeline("text2text-generation")
|