MrSimple07 commited on
Commit
cd201bf
·
1 Parent(s): 1580a2d

fixed app py + document_processor py

Browse files
Files changed (2) hide show
  1. app.py +4 -10
  2. document_processor.py +1 -1
app.py CHANGED
@@ -4,13 +4,7 @@ import sys
4
  from llama_index.llms.google_genai import GoogleGenAI
5
  from llama_index.core import Settings
6
  from config import *
7
- from document_processor import (
8
- initialize_system,
9
- process_uploaded_file,
10
- add_to_vector_index,
11
- get_existing_documents,
12
- log_message
13
- )
14
 
15
  query_engine = None
16
  chunks_df = None
@@ -150,9 +144,9 @@ def create_interface():
150
 
151
  gr.Examples(
152
  examples=[
153
- "What standard establishes the procedure for recognizing test protocols for products in the field of atomic energy use?",
154
- "Who is responsible for organizing and conducting the recognition of product test protocols?",
155
- "In what cases can test protocols be recognized that were conducted by laboratories not included in the listings?",
156
  ],
157
  inputs=question_input
158
  )
 
4
  from llama_index.llms.google_genai import GoogleGenAI
5
  from llama_index.core import Settings
6
  from config import *
7
+ from document_processor import *
 
 
 
 
 
 
8
 
9
  query_engine = None
10
  chunks_df = None
 
144
 
145
  gr.Examples(
146
  examples=[
147
+ "Какой стандарт устанавливает порядок признания протоколов испытаний продукции в области использования атомной энергии?",
148
+ "Кто несет ответственность за организацию и проведение признания протоколов испытаний продукции?",
149
+ "В каких случаях могут быть признаны протоколы испытаний, проведенные лабораториями, не включенными в перечисления?",
150
  ],
151
  inputs=question_input
152
  )
document_processor.py CHANGED
@@ -206,7 +206,7 @@ def initialize_system():
206
  similarity_cutoff=SIMILARITY_THRESHOLD
207
  )
208
 
209
- custom_prompt_template = PromptTemplate(CUSTOM_PROMPT_NEW)
210
  response_synthesizer = get_response_synthesizer(
211
  response_mode=ResponseMode.TREE_SUMMARIZE,
212
  text_qa_template=custom_prompt_template
 
206
  similarity_cutoff=SIMILARITY_THRESHOLD
207
  )
208
 
209
+ custom_prompt_template = PromptTemplate(CUSTOM_PROMPT)
210
  response_synthesizer = get_response_synthesizer(
211
  response_mode=ResponseMode.TREE_SUMMARIZE,
212
  text_qa_template=custom_prompt_template