Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,7 +122,7 @@ def save_rating_to_dataset(stars, coach_notes):
|
|
| 122 |
Guarda la valoración del coach en HuggingFace Dataset para fine-tuning
|
| 123 |
"""
|
| 124 |
global current_timestamp, current_input, current_acad_response, current_pract_response
|
| 125 |
-
global current_metadata, current_temp_acad, current_topp_acad
|
| 126 |
|
| 127 |
if not current_timestamp:
|
| 128 |
return "⚠️ No hay interacción activa para valorar"
|
|
@@ -157,7 +157,8 @@ def save_rating_to_dataset(stars, coach_notes):
|
|
| 157 |
temperature_used=current_temp_acad,
|
| 158 |
top_p_used=current_topp_acad,
|
| 159 |
academic_response=current_acad_response,
|
| 160 |
-
practical_response=current_pract_response
|
|
|
|
| 161 |
)
|
| 162 |
|
| 163 |
# Push a HuggingFace
|
|
@@ -165,6 +166,7 @@ def save_rating_to_dataset(stars, coach_notes):
|
|
| 165 |
|
| 166 |
success_msg = f"✅ Valoración guardada correctamente en HuggingFace ({star_value} estrellas)"
|
| 167 |
print(success_msg)
|
|
|
|
| 168 |
return success_msg
|
| 169 |
|
| 170 |
except Exception as e:
|
|
|
|
| 122 |
Guarda la valoración del coach en HuggingFace Dataset para fine-tuning
|
| 123 |
"""
|
| 124 |
global current_timestamp, current_input, current_acad_response, current_pract_response
|
| 125 |
+
global current_metadata, current_temp_acad, current_topp_acad, current_context
|
| 126 |
|
| 127 |
if not current_timestamp:
|
| 128 |
return "⚠️ No hay interacción activa para valorar"
|
|
|
|
| 157 |
temperature_used=current_temp_acad,
|
| 158 |
top_p_used=current_topp_acad,
|
| 159 |
academic_response=current_acad_response,
|
| 160 |
+
practical_response=current_pract_response,
|
| 161 |
+
citations_context=current_context or "" # NUEVO: contexto académico completo
|
| 162 |
)
|
| 163 |
|
| 164 |
# Push a HuggingFace
|
|
|
|
| 166 |
|
| 167 |
success_msg = f"✅ Valoración guardada correctamente en HuggingFace ({star_value} estrellas)"
|
| 168 |
print(success_msg)
|
| 169 |
+
print(f"📊 Context guardado: {len(current_context) if current_context else 0} chars")
|
| 170 |
return success_msg
|
| 171 |
|
| 172 |
except Exception as e:
|