Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,13 +59,17 @@ class_labels = {0: 'Baked Potato',1: 'Burger',2: 'Cake',3: 'Chips',4: 'Crispy Ch
|
|
| 59 |
29: 'corn',30: 'crab',31: 'cucumber',32: 'eggplant',33: 'eggs',34: 'garlic',36: 'grapes',37: 'milk',
|
| 60 |
38: 'salamon',39: 'yogurt'}
|
| 61 |
|
| 62 |
-
api_key='
|
| 63 |
llm = HuggingFaceEndpoint(
|
| 64 |
repo_id="Qwen/Qwen2.5-72B-Instruct",
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
| 66 |
)
|
| 67 |
-
|
| 68 |
-
|
|
|
|
| 69 |
str_output_parser = StrOutputParser()
|
| 70 |
|
| 71 |
chain_label = predict_label
|
|
|
|
| 59 |
29: 'corn',30: 'crab',31: 'cucumber',32: 'eggplant',33: 'eggs',34: 'garlic',36: 'grapes',37: 'milk',
|
| 60 |
38: 'salamon',39: 'yogurt'}
|
| 61 |
|
| 62 |
+
api_key='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00'
|
| 63 |
llm = HuggingFaceEndpoint(
|
| 64 |
repo_id="Qwen/Qwen2.5-72B-Instruct",
|
| 65 |
+
task="text-generation",
|
| 66 |
+
max_new_tokens=512,
|
| 67 |
+
do_sample=False,
|
| 68 |
+
repetition_penalty=1.03,
|
| 69 |
)
|
| 70 |
+
|
| 71 |
+
chat= ChatHuggingFace(llm=llm)
|
| 72 |
+
|
| 73 |
str_output_parser = StrOutputParser()
|
| 74 |
|
| 75 |
chain_label = predict_label
|