Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -185,6 +185,7 @@ def extract_text_from_file(file_path: str, file_ext: str) -> str:
|
|
185 |
if tables:
|
186 |
for table in tables:
|
187 |
text += "\n".join([" | ".join(str(cell) for cell in row if cell is not None]) + "\n"
|
|
|
188 |
# Fall back to text extraction
|
189 |
page_text = page.extract_text()
|
190 |
if page_text:
|
@@ -698,10 +699,6 @@ def parse_transcript(file_obj, progress=gr.Progress()) -> Tuple[str, Optional[Di
|
|
698 |
logging.error(error_msg)
|
699 |
raise gr.Error(f"{error_msg}\n\nPossible solutions:\n1. Try a different file format\n2. Ensure text is clear and not handwritten\n3. Check file size (<5MB)")
|
700 |
|
701 |
-
# [Rest of your code remains exactly the same...]
|
702 |
-
# Continue with LearningStyleQuiz, ProfileManager, TeachingAssistant classes
|
703 |
-
# and the create_interface() function exactly as you had them
|
704 |
-
|
705 |
# ========== LEARNING STYLE QUIZ ==========
|
706 |
class LearningStyleQuiz:
|
707 |
def __init__(self):
|
|
|
185 |
if tables:
|
186 |
for table in tables:
|
187 |
text += "\n".join([" | ".join(str(cell) for cell in row if cell is not None]) + "\n"
|
188 |
+
for row in table])
|
189 |
# Fall back to text extraction
|
190 |
page_text = page.extract_text()
|
191 |
if page_text:
|
|
|
699 |
logging.error(error_msg)
|
700 |
raise gr.Error(f"{error_msg}\n\nPossible solutions:\n1. Try a different file format\n2. Ensure text is clear and not handwritten\n3. Check file size (<5MB)")
|
701 |
|
|
|
|
|
|
|
|
|
702 |
# ========== LEARNING STYLE QUIZ ==========
|
703 |
class LearningStyleQuiz:
|
704 |
def __init__(self):
|