Spaces:
Running
Running
Commit
·
b72a26a
1
Parent(s):
50fadef
token bug
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ class WebSocketStreamingCallbackHandler(BaseCallbackHandler):
|
|
38 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
39 |
|
40 |
class ChatHuggingFace:
|
41 |
-
def __init__(self, model, token, temperature=0.3, streaming=False):
|
42 |
# Instead of using InferenceClient, load the model locally.
|
43 |
self.temperature = temperature
|
44 |
self.streaming = streaming
|
@@ -104,7 +104,7 @@ model_name="Qwen/Qwen2.5-1.5B-Instruct"
|
|
104 |
# llm = ChatOllama(model=model_name, temperature=0.3, streaming=True)
|
105 |
llm = ChatHuggingFace(
|
106 |
model=model_name,
|
107 |
-
# token=token
|
108 |
temperature=0.3,
|
109 |
streaming=True # or True, based on your needs
|
110 |
)
|
|
|
38 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
39 |
|
40 |
class ChatHuggingFace:
|
41 |
+
def __init__(self, model, token="", temperature=0.3, streaming=False):
|
42 |
# Instead of using InferenceClient, load the model locally.
|
43 |
self.temperature = temperature
|
44 |
self.streaming = streaming
|
|
|
104 |
# llm = ChatOllama(model=model_name, temperature=0.3, streaming=True)
|
105 |
llm = ChatHuggingFace(
|
106 |
model=model_name,
|
107 |
+
# token=token
|
108 |
temperature=0.3,
|
109 |
streaming=True # or True, based on your needs
|
110 |
)
|