Spaces:
Sleeping
Sleeping
Futyn-Maker
commited on
Commit
·
c4dd122
1
Parent(s):
0a340bb
Fix last fucking syntax errors
Browse files
app.py
CHANGED
|
@@ -200,8 +200,7 @@ def process_full_pipeline(text: str, n_candidates: int) -> str:
|
|
| 200 |
text.strip(), n_candidates=n_candidates)
|
| 201 |
return format_pipeline_results(results)
|
| 202 |
except Exception as e:
|
| 203 |
-
return f"<div style='color: red; padding: 20px;'>Error processing text: {
|
| 204 |
-
str(e)}</div>"
|
| 205 |
|
| 206 |
|
| 207 |
def process_span_prediction(text: str, patterns_text: str) -> str:
|
|
@@ -231,8 +230,7 @@ def process_span_prediction(text: str, patterns_text: str) -> str:
|
|
| 231 |
results = SPAN_PREDICTOR.predict_spans(examples_with_patterns)
|
| 232 |
return format_span_results(text.strip(), results)
|
| 233 |
except Exception as e:
|
| 234 |
-
return f"<div style='color: red; padding: 20px;'>Error processing spans: {
|
| 235 |
-
str(e)}</div>"
|
| 236 |
|
| 237 |
# Create the Gradio interface
|
| 238 |
|
|
|
|
| 200 |
text.strip(), n_candidates=n_candidates)
|
| 201 |
return format_pipeline_results(results)
|
| 202 |
except Exception as e:
|
| 203 |
+
return f"<div style='color: red; padding: 20px;'>Error processing text: {str(e)}</div>"
|
|
|
|
| 204 |
|
| 205 |
|
| 206 |
def process_span_prediction(text: str, patterns_text: str) -> str:
|
|
|
|
| 230 |
results = SPAN_PREDICTOR.predict_spans(examples_with_patterns)
|
| 231 |
return format_span_results(text.strip(), results)
|
| 232 |
except Exception as e:
|
| 233 |
+
return f"<div style='color: red; padding: 20px;'>Error processing spans: {str(e)}</div>"
|
|
|
|
| 234 |
|
| 235 |
# Create the Gradio interface
|
| 236 |
|