Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,11 @@
|
|
| 3 |
#importing the required libraries including transformers
|
| 4 |
import gradio as gr
|
| 5 |
from huggingface_hub import InferenceClient
|
| 6 |
-
|
| 7 |
-
import torch
|
| 8 |
-
|
| 9 |
-
# Use a pipeline as a high-level helper
|
| 10 |
-
from transformers import pipeline, AutoModel
|
| 11 |
|
| 12 |
model_name = "bmas10/ForJerry"
|
| 13 |
model = AutoModel.from_pretrained(model_name)
|
|
|
|
| 14 |
messages = [
|
| 15 |
{"role": "user", "content": "Who are you?"},
|
| 16 |
]
|
|
|
|
| 3 |
#importing the required libraries including transformers
|
| 4 |
import gradio as gr
|
| 5 |
from huggingface_hub import InferenceClient
|
| 6 |
+
from transformers import pipeline, AutoModel, AutoTokenizer
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
model_name = "bmas10/ForJerry"
|
| 9 |
model = AutoModel.from_pretrained(model_name)
|
| 10 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 11 |
messages = [
|
| 12 |
{"role": "user", "content": "Who are you?"},
|
| 13 |
]
|