Spaces:
Sleeping
Sleeping
Commit
·
5f18847
1
Parent(s):
496da29
Update app.py
Browse files
app.py
CHANGED
@@ -146,15 +146,13 @@ if add_row:
|
|
146 |
|
147 |
if paste_data:
|
148 |
data = StringIO(data_section.strip())
|
149 |
-
reader = csv.reader(data, delimiter='
|
150 |
urls_questions = [row for row in reader]
|
151 |
|
152 |
row_count = len(urls_questions)
|
153 |
st.session_state.row_count = row_count
|
154 |
|
155 |
-
for i,
|
156 |
-
url_question = row.split('\t') # Splitting by tab character
|
157 |
-
|
158 |
if len(url_question) >= 2:
|
159 |
st.session_state[f"url{i}"] = url_question[0]
|
160 |
st.session_state[f"question{i}"] = url_question[1]
|
|
|
146 |
|
147 |
if paste_data:
|
148 |
data = StringIO(data_section.strip())
|
149 |
+
reader = csv.reader(data, delimiter='\t', quotechar='"') # Changed delimiter to '\t'
|
150 |
urls_questions = [row for row in reader]
|
151 |
|
152 |
row_count = len(urls_questions)
|
153 |
st.session_state.row_count = row_count
|
154 |
|
155 |
+
for i, url_question in enumerate(urls_questions): # Directly iterate over urls_questions
|
|
|
|
|
156 |
if len(url_question) >= 2:
|
157 |
st.session_state[f"url{i}"] = url_question[0]
|
158 |
st.session_state[f"question{i}"] = url_question[1]
|