Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,12 @@ async def update_validation_space_on_answer(response, type, timestamp):
|
|
51 |
from build_space import create_validation_space
|
52 |
validation_dataset = create_validation_space(country)
|
53 |
|
54 |
-
response_value =
|
55 |
-
if hasattr(response, 'values') and 'text' in response.values:
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
# Create a validation record with the correct attribute
|
62 |
# Instead of response.value, we need to find the correct attribute
|
|
|
51 |
from build_space import create_validation_space
|
52 |
validation_dataset = create_validation_space(country)
|
53 |
|
54 |
+
response_value = str(response)
|
55 |
+
# if hasattr(response, 'values') and 'text' in response.values:
|
56 |
+
# if isinstance(response.values['text'], dict) and 'value' in response.values['text']:
|
57 |
+
# response_value = response.values['text']['value']
|
58 |
+
# else:
|
59 |
+
# response_value = str(response.values['text'])
|
60 |
|
61 |
# Create a validation record with the correct attribute
|
62 |
# Instead of response.value, we need to find the correct attribute
|