Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
9247640
1
Parent(s):
ac73d94
do not notify about bad requests
Browse files
app.py
CHANGED
@@ -190,7 +190,7 @@ def call_perspective_api(texts_df, column_name, nested_column_name, dataset, con
|
|
190 |
except Exception as e:
|
191 |
logging.info(e)
|
192 |
logging.info(data)
|
193 |
-
yield {"bad request, example skipped...": i / n_samples}, plt.gcf(), pd.DataFrame.from_dict({**texts_processed, **req_att_scores})
|
194 |
continue
|
195 |
|
196 |
if req_response.ok:
|
@@ -211,7 +211,7 @@ def call_perspective_api(texts_df, column_name, nested_column_name, dataset, con
|
|
211 |
except Exception as e:
|
212 |
logging.info(e)
|
213 |
logging.info(data)
|
214 |
-
yield {"bad request, example skipped": i / n_samples}, plt.gcf(), pd.DataFrame.from_dict({**texts_processed, **req_att_scores})
|
215 |
continue
|
216 |
|
217 |
if i % 10 == 0:
|
|
|
190 |
except Exception as e:
|
191 |
logging.info(e)
|
192 |
logging.info(data)
|
193 |
+
# yield {"bad request, example skipped...": i / n_samples}, plt.gcf(), pd.DataFrame.from_dict({**texts_processed, **req_att_scores})
|
194 |
continue
|
195 |
|
196 |
if req_response.ok:
|
|
|
211 |
except Exception as e:
|
212 |
logging.info(e)
|
213 |
logging.info(data)
|
214 |
+
# yield {"bad request, example skipped": i / n_samples}, plt.gcf(), pd.DataFrame.from_dict({**texts_processed, **req_att_scores})
|
215 |
continue
|
216 |
|
217 |
if i % 10 == 0:
|