Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,12 +7,12 @@ Original file is located at
|
|
| 7 |
https://colab.research.google.com/drive/1zRuAxGm_11lNIeBxFlHVzc5tNKhyLef4
|
| 8 |
"""
|
| 9 |
import gradio as gr
|
| 10 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 11 |
|
| 12 |
# 鍔犺級 LLaMA 妯″瀷
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
# 瀹氱京鎺ㄧ悊鍑芥暩
|
| 18 |
def generate_text(prompt):
|
|
|
|
| 7 |
https://colab.research.google.com/drive/1zRuAxGm_11lNIeBxFlHVzc5tNKhyLef4
|
| 8 |
"""
|
| 9 |
import gradio as gr
|
|
|
|
| 10 |
|
| 11 |
# 鍔犺級 LLaMA 妯″瀷
|
| 12 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 13 |
+
|
| 14 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf")
|
| 15 |
+
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf")
|
| 16 |
|
| 17 |
# 瀹氱京鎺ㄧ悊鍑芥暩
|
| 18 |
def generate_text(prompt):
|