kelvinyasu commited on
Commit
eee0d11
1 Parent(s): 3519ac7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -49,14 +49,18 @@ def predict(message, chatbot):
49
  # Decode from bytes to string
50
  decoded_line = line.decode('utf-8')
51
 
 
 
 
 
52
  # Remove 'data:' prefix
53
- if decoded_line.startswith('data:'):
54
- json_line = decoded_line[5:] # Exclude the first 5 characters ('data:')
55
- else:
56
  #gr.Warning(f"This line does not start with 'data:': {decoded_line}")
57
- json_line = decoded_line
58
- print(decoded_line)
59
- continue
60
 
61
  # Load as JSON
62
  try:
 
49
  # Decode from bytes to string
50
  decoded_line = line.decode('utf-8')
51
 
52
+
53
+ json_line = decoded_line
54
+ print(decoded_line)
55
+
56
  # Remove 'data:' prefix
57
+ #if decoded_line.startswith('data:'):
58
+ # json_line = decoded_line[5:] # Exclude the first 5 characters ('data:')
59
+ #else:
60
  #gr.Warning(f"This line does not start with 'data:': {decoded_line}")
61
+ # json_line = decoded_line
62
+ # print(decoded_line)
63
+ # continue
64
 
65
  # Load as JSON
66
  try: