Spaces:
Running
Running
Update app_6.py
Browse files
app_6.py
CHANGED
@@ -138,7 +138,7 @@ def extract_arguments(text, tokenizer, model, beam_search=True):
|
|
138 |
# Inserts tags into the original text based on token offsets.
|
139 |
if start_token is not None and end_token is not None:
|
140 |
|
141 |
-
st.write(f"Start: {start_token}, End: {end_token}")
|
142 |
|
143 |
|
144 |
if start_token > end_token:
|
@@ -150,7 +150,7 @@ def extract_arguments(text, tokenizer, model, beam_search=True):
|
|
150 |
start_idx, end_idx = offset_mapping[start_token][0], offset_mapping[end_token][1]
|
151 |
|
152 |
if start_idx is not None and end_idx is not None and start_idx < end_idx:
|
153 |
-
st.write(f"Start_idx: {start_idx}, End_idx: {end_idx}")
|
154 |
|
155 |
return (
|
156 |
original_text[:start_idx]
|
|
|
138 |
# Inserts tags into the original text based on token offsets.
|
139 |
if start_token is not None and end_token is not None:
|
140 |
|
141 |
+
#st.write(f"Start: {start_token}, End: {end_token}")
|
142 |
|
143 |
|
144 |
if start_token > end_token:
|
|
|
150 |
start_idx, end_idx = offset_mapping[start_token][0], offset_mapping[end_token][1]
|
151 |
|
152 |
if start_idx is not None and end_idx is not None and start_idx < end_idx:
|
153 |
+
#st.write(f"Start_idx: {start_idx}, End_idx: {end_idx}")
|
154 |
|
155 |
return (
|
156 |
original_text[:start_idx]
|