Spaces:
Sleeping
Sleeping
Commit
·
81050d1
1
Parent(s):
cf42bd0
test xíu
Browse files
app.py
CHANGED
@@ -1,13 +1,10 @@
|
|
1 |
# app_phogpt4b_chat.py
|
2 |
import gradio as gr
|
3 |
-
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
"text-generation",
|
8 |
-
model="vinai/PhoGPT-4B-Chat",
|
9 |
-
trust_remote_code=True
|
10 |
-
)
|
11 |
|
12 |
# 2️⃣ Hàm chat handler
|
13 |
def respond(message, history):
|
|
|
1 |
# app_phogpt4b_chat.py
|
2 |
import gradio as gr
|
3 |
+
# Load model directly
|
4 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("vinai/PhoGPT-4B-Chat", trust_remote_code=True)
|
7 |
+
model = AutoModelForCausalLM.from_pretrained("vinai/PhoGPT-4B-Chat", trust_remote_code=True)
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# 2️⃣ Hàm chat handler
|
10 |
def respond(message, history):
|