Spaces:
Sleeping
Sleeping
pierreguillou
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -114,16 +114,11 @@ def initialize_gemini():
|
|
114 |
except Exception as e:
|
115 |
raise gr.Error(f"Error initializing Gemini: {str(e)}")
|
116 |
|
117 |
-
def create_prompt(extracted_text: str) -> str:
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
"demandeurs": [],
|
123 |
-
"defendeurs": [],
|
124 |
-
"avocats_demandeurs": [],
|
125 |
-
"avocats_defendeurs": []
|
126 |
-
}
|
127 |
|
128 |
prompt = f"""Tu es un assistant juridique expert en analyse de documents judiciaires français.
|
129 |
Je vais te fournir le contenu d'un document judiciaire extrait d'un PDF.
|
|
|
114 |
except Exception as e:
|
115 |
raise gr.Error(f"Error initializing Gemini: {str(e)}")
|
116 |
|
117 |
+
def create_prompt(extracted_text: str, path_to_data_to_extract: str) -> str:
|
118 |
+
|
119 |
+
# load data to extract
|
120 |
+
with open(path_to_data_to_extract, 'r', encoding='utf-8') as file:
|
121 |
+
data_to_extract = json.load(file)
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
prompt = f"""Tu es un assistant juridique expert en analyse de documents judiciaires français.
|
124 |
Je vais te fournir le contenu d'un document judiciaire extrait d'un PDF.
|