ouhenio commited on
Commit
f831d7c
·
verified ·
1 Parent(s): 501ba98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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 = None
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
 
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