Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,14 +97,13 @@ def mode_load(path):
|
|
97 |
|
98 |
|
99 |
@spaces.GPU()
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
)
|
107 |
-
model.eval()
|
108 |
def stream_chat(message, history: list, temperature: float, max_length: int, top_p: float, top_k: int, penalty: float):
|
109 |
print(f'message is - {message}')
|
110 |
print(f'history is - {history}')
|
|
|
97 |
|
98 |
|
99 |
@spaces.GPU()
|
100 |
+
model = AutoModelForCausalLM.from_pretrained(
|
101 |
+
MODEL_ID,
|
102 |
+
torch_dtype=torch.bfloat16,
|
103 |
+
low_cpu_mem_usage=True,
|
104 |
+
trust_remote_code=True
|
105 |
+
)
|
106 |
+
model.eval()
|
|
|
107 |
def stream_chat(message, history: list, temperature: float, max_length: int, top_p: float, top_k: int, penalty: float):
|
108 |
print(f'message is - {message}')
|
109 |
print(f'history is - {history}')
|