Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,9 @@ def process_images(uploaded_file):
|
|
61 |
if uploaded_file is None:
|
62 |
results_df = results_df.iloc[0:0] # Clear the DataFrame
|
63 |
return "", "" # Return empty outputs if no file is uploaded
|
|
|
|
|
|
|
64 |
file_path = uploaded_file.name # Gradio provides the file path through the .name attribute
|
65 |
try:
|
66 |
image_files = unzip_and_find_jpgs(file_path)
|
|
|
61 |
if uploaded_file is None:
|
62 |
results_df = results_df.iloc[0:0] # Clear the DataFrame
|
63 |
return "", "" # Return empty outputs if no file is uploaded
|
64 |
+
else:
|
65 |
+
results_df = pd.DataFrame(columns=["Filename", "Extracted Text", "Translated Text"]) # Reinitialize the DataFrame
|
66 |
+
|
67 |
file_path = uploaded_file.name # Gradio provides the file path through the .name attribute
|
68 |
try:
|
69 |
image_files = unzip_and_find_jpgs(file_path)
|