Spaces:
Sleeping
Sleeping
Update app.py
Browse files102 unmodified lines103104105106107108109177 unmodified lines287288289290291292293294295102 unmodified lineselse:print("Failed to fetch the PDF from the URL.")except Exception as e:print("An error occurred:", e)return "Error"177 unmodified linesif(pages_info == "Error"):return jsonify({"error": "Failed to fetch the PDF from the URL seperate_image_text_from_pdf "}), 500list.append(4)content = pdf_image_text_embedding_and_text_embedding(pages_info)if content == "Error":return jsonify({"error": "An error occurred while processing the PDF"}), 500list.append(5)print(content)return jsonify({"content": content}), 200102 unmodified lines103104105106107108177 unmodified lines286287288289290291292293294295296297298299102 unmodified lineselse:print("Failed to fetch the PDF from the URL.")except Exception as e:print("An error occurred:", e)return "Error"177 unmodified linesif(pages_info == "Error"):return jsonify({"error": "Failed to fetch the PDF from the URL seperate_image_text_from_pdf "}), 500list.append(4)print(pages_info)try:content = pdf_image_text_embedding_and_text_embedding(pages_info)except Exception as e1:print(e1)return jsonify({"error": "An error occurred 1 while processing the PDF"}), 500if content == "Error":return jsonify({"error": "An error occurred 2 while processing the PDF"}), 500list.append(5)print(content)return jsonify({"content": content}), 200
app.py+7-3