Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
3 |
|
4 |
# Tải mô hình đã upload từ Hugging Face
|
5 |
model_name = "TDN-M/tknv1" # Thay thế bằng tên người dùng và tên repository của bạn
|
6 |
-
pipe = pipeline("text-generation", model=model_name)
|
7 |
|
8 |
def chatbot(input_text):
|
9 |
# Tạo tin nhắn từ người dùng
|
@@ -25,4 +25,4 @@ iface = gr.Interface(
|
|
25 |
)
|
26 |
|
27 |
# Chạy ứng dụng
|
28 |
-
iface.launch()
|
|
|
3 |
|
4 |
# Tải mô hình đã upload từ Hugging Face
|
5 |
model_name = "TDN-M/tknv1" # Thay thế bằng tên người dùng và tên repository của bạn
|
6 |
+
pipe = pipeline("text-generation", model=model_name, max_new_tokens=2048)
|
7 |
|
8 |
def chatbot(input_text):
|
9 |
# Tạo tin nhắn từ người dùng
|
|
|
25 |
)
|
26 |
|
27 |
# Chạy ứng dụng
|
28 |
+
iface.launch(share=True) # Thêm share=True để tạo public link
|