Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
### Set Up the Language Model
|
| 2 |
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
# Load a pre-trained model
|
| 6 |
-
language_model = pipeline("text-generation", model="gpt2")
|
| 7 |
|
| 8 |
### Index with LlamaIndex
|
| 9 |
|
|
|
|
| 1 |
+
### llama-index
|
| 2 |
+
pip uninstall llama-index
|
| 3 |
+
pip install llama-index
|
| 4 |
+
|
| 5 |
### Set Up the Language Model
|
| 6 |
|
| 7 |
from transformers import pipeline
|
| 8 |
|
| 9 |
# Load a pre-trained model
|
| 10 |
+
language_model = pipeline("text-generation", model="gpt2", clean_up_tokenization_spaces=True)
|
| 11 |
|
| 12 |
### Index with LlamaIndex
|
| 13 |
|