Spaces:
Sleeping
Sleeping
Antigravity Bot commited on
Commit ·
11747ae
1
Parent(s): 0865bea
Switch to Qwen 2.5 Coder 3B for better coding perfs
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import gradio as gr
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
# 1. Carrega o modelo (Isso já estava funcionando)
|
| 5 |
-
pipe = pipeline("text-generation", model="Qwen/Qwen2.5-
|
| 6 |
|
| 7 |
def predict(message, history):
|
| 8 |
"""
|
|
@@ -42,7 +42,7 @@ demo = gr.ChatInterface(
|
|
| 42 |
fn=predict,
|
| 43 |
type="messages", # <--- ESTA LINHA CORRIGE O AVISO E MUDA O FORMATO DO HISTÓRICO
|
| 44 |
title="Qwen Agent Node",
|
| 45 |
-
description="Bot rodando Qwen 2.5 via CPU no Hugging Face."
|
| 46 |
)
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
# 1. Carrega o modelo (Isso já estava funcionando)
|
| 5 |
+
pipe = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-3B-Instruct", device_map="cpu")
|
| 6 |
|
| 7 |
def predict(message, history):
|
| 8 |
"""
|
|
|
|
| 42 |
fn=predict,
|
| 43 |
type="messages", # <--- ESTA LINHA CORRIGE O AVISO E MUDA O FORMATO DO HISTÓRICO
|
| 44 |
title="Qwen Agent Node",
|
| 45 |
+
description="Bot rodando Qwen 2.5 Coder 3B via CPU no Hugging Face."
|
| 46 |
)
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|