Bisher commited on
Commit
3ee9271
·
verified ·
1 Parent(s): 07bd8be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,9 +69,9 @@ def diacritize_text_api(text_to_diacritize):
69
  api_name="/predict"
70
  )
71
  # Ensure result is a string, handle potential None or unexpected types
72
- # result_str = str(result) if result is not None else "Error: Empty response from diacritization service."
73
  # Return the result for both the output textbox and the state
74
- return result[0], result[1]
75
  except Exception as e:
76
  print(f"Error during diacritization API call: {e}")
77
  return f"Error during diacritization: {e}", ""
 
69
  api_name="/predict"
70
  )
71
  # Ensure result is a string, handle potential None or unexpected types
72
+ result_str = str(result) if result is not None else "Error: Empty response from diacritization service."
73
  # Return the result for both the output textbox and the state
74
+ return result_str, result_str
75
  except Exception as e:
76
  print(f"Error during diacritization API call: {e}")
77
  return f"Error during diacritization: {e}", ""