Update README.md
Browse files
README.md
CHANGED
|
@@ -168,20 +168,23 @@ Here's an example of how to use the model:
|
|
| 168 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
| 169 |
|
| 170 |
# Load the tokenizer and model
|
| 171 |
-
tokenizer = T5Tokenizer.from_pretrained("flan-t5-base-paragrapher")
|
| 172 |
-
model = T5ForConditionalGeneration.from_pretrained(
|
|
|
|
|
|
|
| 173 |
|
| 174 |
# Define input texts
|
| 175 |
input_texts = [
|
| 176 |
"""ge with a narrative—whether through books, films, or oral traditions—we are invited into another person's experience (Brown & Thompson, 2023). This immersion allows us to see the world through different perspectives, breaking down barriers of misunderstanding and prejudice. For example, novels like Harper Lee's "To Kill a Mockingbird" challenge readers to confront issues of racism and injustice through the eyes of a child (Williams, 2018). Similarly, contemporary works such as Chimamanda Ngozi Adichie's "Americanah" explore themes of identity and belonging in a globalized world (Nguyen & Roberts, 2020). By sharing these experiences through storytelling, authors can cultivate empathy in their audiences, encouraging them to reflect on their own beliefs and biases.
|
| 177 |
Shaping Identity Through Narratives
|
| 178 |
Stories also play a crucial role in shaping personal and collective identities. From childhood tales told by parents to the myths and legends that define cultural heritage, narratives help individuals understand their place in the world (Anderson & White, 2021). They provide frameworks thro""",
|
| 179 |
-
|
| 180 |
-
"""cia, M., & Patel, R. (2022). Cultural insights through literature: A comparative analysis. International Journal of Cultural Studies, 15(3), 201-215. Johnson, L., & Lee, H. (2019). Oral traditions: Preserving culture through storytelling. Anthropology Today Journal, 34(4), 56-60. Kumar, P. (2021). Epic tales: Literature as a reflection of society. Literary Critique Review, 29(1), 34-50. Lee, J., & Martinez, F. (2021). Voices unheard: Marginalized narratives in digital spaces. Journal of Digital Culture Studies, 7(2), 45-67. Martinez, C., & Chen, Y. (2022). Cultural navigation: Identity in a globalized world. Global Studies Review Jou"""
|
| 181 |
]
|
| 182 |
|
| 183 |
# Tokenize input texts
|
| 184 |
-
input_ids = tokenizer(
|
|
|
|
|
|
|
| 185 |
|
| 186 |
# Generate outputs
|
| 187 |
outputs = model.generate(input_ids, max_length=512)
|
|
@@ -193,8 +196,6 @@ for output in outputs:
|
|
| 193 |
|
| 194 |
Example output:
|
| 195 |
|
| 196 |
-
```
|
| 197 |
-
Through storytelling, we are invited into another person's experience, breaking down barriers of misunderstanding and prejudice. This immersion allows us to see the world through different perspectives, fostering empathy and re-evaluating our own beliefs and biases. For instance, Harper Lee's "To Kill a Mockingbird" challenges readers to confront issues of racism and injustice through the eyes of a child, while contemporary works like Chimamanda Ngozi Adichie's "Americanah" explore themes of identity and belonging in a globalized world. By sharing these experiences through storytelling, authors
|
| 198 |
|
| 199 |
-
The study of cultural insights through literature has yielded valuable insights into the world. Ci and Patel (2022) conducted a comparative analysis of cultural insights through literature, highlighting the importance of cultural storytelling in preserving culture. Kumar (2021) argued that oral traditions can preserve culture through storytelling, highlighting the importance of storytelling in preserving culture. Lee and Martinez (2021) explored marginalized narratives in digital spaces, highlighting the need for cultural navigation in a globalized world. These studies collectively demonstrate the importance of cultural navigation in fostering identity and identity in a globalized world
|
| 200 |
-
```
|
|
|
|
| 168 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
| 169 |
|
| 170 |
# Load the tokenizer and model
|
| 171 |
+
tokenizer = T5Tokenizer.from_pretrained("agentlans/flan-t5-base-paragrapher")
|
| 172 |
+
model = T5ForConditionalGeneration.from_pretrained(
|
| 173 |
+
"agentlans/flan-t5-base-paragrapher", device_map="auto"
|
| 174 |
+
)
|
| 175 |
|
| 176 |
# Define input texts
|
| 177 |
input_texts = [
|
| 178 |
"""ge with a narrative—whether through books, films, or oral traditions—we are invited into another person's experience (Brown & Thompson, 2023). This immersion allows us to see the world through different perspectives, breaking down barriers of misunderstanding and prejudice. For example, novels like Harper Lee's "To Kill a Mockingbird" challenge readers to confront issues of racism and injustice through the eyes of a child (Williams, 2018). Similarly, contemporary works such as Chimamanda Ngozi Adichie's "Americanah" explore themes of identity and belonging in a globalized world (Nguyen & Roberts, 2020). By sharing these experiences through storytelling, authors can cultivate empathy in their audiences, encouraging them to reflect on their own beliefs and biases.
|
| 179 |
Shaping Identity Through Narratives
|
| 180 |
Stories also play a crucial role in shaping personal and collective identities. From childhood tales told by parents to the myths and legends that define cultural heritage, narratives help individuals understand their place in the world (Anderson & White, 2021). They provide frameworks thro""",
|
| 181 |
+
"""cia, M., & Patel, R. (2022). Cultural insights through literature: A comparative analysis. International Journal of Cultural Studies, 15(3), 201-215. Johnson, L., & Lee, H. (2019). Oral traditions: Preserving culture through storytelling. Anthropology Today Journal, 34(4), 56-60. Kumar, P. (2021). Epic tales: Literature as a reflection of society. Literary Critique Review, 29(1), 34-50. Lee, J., & Martinez, F. (2021). Voices unheard: Marginalized narratives in digital spaces. Journal of Digital Culture Studies, 7(2), 45-67. Martinez, C., & Chen, Y. (2022). Cultural navigation: Identity in a globalized world. Global Studies Review Jou""",
|
|
|
|
| 182 |
]
|
| 183 |
|
| 184 |
# Tokenize input texts
|
| 185 |
+
input_ids = tokenizer(
|
| 186 |
+
input_texts, return_tensors="pt", padding=True, truncation=True
|
| 187 |
+
).input_ids.to("cuda")
|
| 188 |
|
| 189 |
# Generate outputs
|
| 190 |
outputs = model.generate(input_ids, max_length=512)
|
|
|
|
| 196 |
|
| 197 |
Example output:
|
| 198 |
|
| 199 |
+
```Through storytelling, we are invited into another person's experience, breaking down barriers of misunderstanding and prejudice. This immersion allows us to see the world through different perspectives, fostering empathy and re-evaluating our own beliefs and biases. For instance, Harper Lee's "To Kill a Mockingbird" challenges readers to confront issues of racism and injustice through the eyes of a child, while contemporary works like Chimamanda Ngozi Adichie's "Americanah" explore themes of identity and belonging in a globalized world. By sharing these experiences through storytelling, authors```
|
|
|
|
| 200 |
|
| 201 |
+
```The study of cultural insights through literature has yielded valuable insights into the world. Ci and Patel (2022) conducted a comparative analysis of cultural insights through literature, highlighting the importance of cultural storytelling in preserving culture. Kumar (2021) argued that oral traditions can preserve culture through storytelling, highlighting the importance of storytelling in preserving culture. Lee and Martinez (2021) explored marginalized narratives in digital spaces, highlighting the need for cultural navigation in a globalized world. These studies collectively demonstrate the importance of cultural navigation in fostering identity and identity in a globalized world.```
|
|
|