Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
# Import the necessary libraries
|
| 2 |
import streamlit as st
|
| 3 |
-
from transformers import GPT2Tokenizer,
|
| 4 |
import torch
|
| 5 |
|
| 6 |
# Load the gpt2-large model and tokenizer for text generation
|
| 7 |
-
gen_model =
|
| 8 |
gen_tokenizer = GPT2Tokenizer.from_pretrained('gpt2-large')
|
| 9 |
|
| 10 |
# Load the zero-shot text classification pipeline from HuggingFace
|
|
|
|
| 1 |
# Import the necessary libraries
|
| 2 |
import streamlit as st
|
| 3 |
+
from transformers import GPT2Tokenizer, GPT2Model, pipeline
|
| 4 |
import torch
|
| 5 |
|
| 6 |
# Load the gpt2-large model and tokenizer for text generation
|
| 7 |
+
gen_model = GPT2Model.from_pretrained('gpt2-large')
|
| 8 |
gen_tokenizer = GPT2Tokenizer.from_pretrained('gpt2-large')
|
| 9 |
|
| 10 |
# Load the zero-shot text classification pipeline from HuggingFace
|