Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
from flask import Flask, render_template, request, redirect, url_for, flash, session, send_from_directory
|
3 |
import os
|
4 |
from utility.utils import extract_text_from_images,Data_Extractor,json_to_llm_str,process_extracted_text,process_resume_data
|
5 |
-
|
6 |
# Flask App
|
7 |
app = Flask(__name__)
|
8 |
app.secret_key = 'your_secret_key'
|
@@ -77,14 +77,18 @@ def process_file():
|
|
77 |
llmText=json_to_llm_str(extracted_text)
|
78 |
print("llmText---------->",llmText)
|
79 |
LLMdata = Data_Extractor(llmText)
|
80 |
-
print("
|
81 |
|
82 |
except Exception as e:
|
83 |
# Handling any exceptions during the process
|
84 |
print(f"An error occurred: {e}")
|
85 |
-
|
86 |
# Run the backup model in case of an exception
|
87 |
print("Running backup model...")
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
cont_data=process_extracted_text(extracted_text)
|
90 |
print("cont_data----------------------------",cont_data)
|
|
|
2 |
from flask import Flask, render_template, request, redirect, url_for, flash, session, send_from_directory
|
3 |
import os
|
4 |
from utility.utils import extract_text_from_images,Data_Extractor,json_to_llm_str,process_extracted_text,process_resume_data
|
5 |
+
from backup.backup import NER_Model
|
6 |
# Flask App
|
7 |
app = Flask(__name__)
|
8 |
app.secret_key = 'your_secret_key'
|
|
|
77 |
llmText=json_to_llm_str(extracted_text)
|
78 |
print("llmText---------->",llmText)
|
79 |
LLMdata = Data_Extractor(llmText)
|
80 |
+
print("LLM data----------------------------",LLMdata)
|
81 |
|
82 |
except Exception as e:
|
83 |
# Handling any exceptions during the process
|
84 |
print(f"An error occurred: {e}")
|
|
|
85 |
# Run the backup model in case of an exception
|
86 |
print("Running backup model...")
|
87 |
+
|
88 |
+
text=json_to_llm_str(extracted_text)
|
89 |
+
LLMdata=NER_Model(text)
|
90 |
+
print("NER data----------------------------",LLMdata)
|
91 |
+
|
92 |
|
93 |
cont_data=process_extracted_text(extracted_text)
|
94 |
print("cont_data----------------------------",cont_data)
|