Spaces:
Sleeping
Sleeping
Commit
·
14052a3
1
Parent(s):
6b75ebd
fix: model prediction remove chat template
Browse files- prediction.py +1 -2
prediction.py
CHANGED
@@ -119,8 +119,7 @@ class ModelPrediction:
|
|
119 |
# inference endpoint costs HF per Hour 3.6$/h -> 0.001 $ per second
|
120 |
# https://huggingface.co/docs/inference-endpoints/en/pricing?utm_source=chatgpt.com
|
121 |
cost_per_second=0.001
|
122 |
-
response = outputs[0]["generated_text"][-1]
|
123 |
-
print(response)
|
124 |
return {
|
125 |
"response": response,
|
126 |
"cost": elapsed_time * cost_per_second
|
|
|
119 |
# inference endpoint costs HF per Hour 3.6$/h -> 0.001 $ per second
|
120 |
# https://huggingface.co/docs/inference-endpoints/en/pricing?utm_source=chatgpt.com
|
121 |
cost_per_second=0.001
|
122 |
+
response = outputs[0]["generated_text"][-1]['content']
|
|
|
123 |
return {
|
124 |
"response": response,
|
125 |
"cost": elapsed_time * cost_per_second
|