Spaces:
Running
on
Zero
Running
on
Zero
Felipe Silva
commited on
Commit
·
16f21ed
1
Parent(s):
9ec48a8
Ajuste lines resposta
Browse files- app.py +2 -2
- rag_utils.py +1 -11
app.py
CHANGED
|
@@ -55,8 +55,8 @@ def launch_app():
|
|
| 55 |
file_input = gr.File(label="Upload da Imagem ou PDF", file_types=[".png", ".jpg", ".jpeg", ".pdf"])
|
| 56 |
extracted_text = gr.Textbox(label="Texto extraído", lines=15)
|
| 57 |
with gr.Column():
|
| 58 |
-
question_input = gr.Textbox(label="Faça uma pergunta ao seu documento!")
|
| 59 |
-
answer_output = gr.Textbox(label="Resposta")
|
| 60 |
|
| 61 |
# Conecta funções
|
| 62 |
file_input.change(fn=process_file, inputs=file_input, outputs=extracted_text)
|
|
|
|
| 55 |
file_input = gr.File(label="Upload da Imagem ou PDF", file_types=[".png", ".jpg", ".jpeg", ".pdf"])
|
| 56 |
extracted_text = gr.Textbox(label="Texto extraído", lines=15)
|
| 57 |
with gr.Column():
|
| 58 |
+
question_input = gr.Textbox(label="📌 Faça uma pergunta ao seu documento!")
|
| 59 |
+
answer_output = gr.Textbox(label="🎩 Resposta", lines=20)
|
| 60 |
|
| 61 |
# Conecta funções
|
| 62 |
file_input.change(fn=process_file, inputs=file_input, outputs=extracted_text)
|
rag_utils.py
CHANGED
|
@@ -82,14 +82,4 @@ def create_rag_chain(vectorstore):
|
|
| 82 |
|
| 83 |
|
| 84 |
if __name__ == '__main__':
|
| 85 |
-
pass
|
| 86 |
-
|
| 87 |
-
# resposta = rag_chain.run(pergunta)
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
# pergunta = "Qual o número da nfse?"
|
| 92 |
-
# resposta = rag_chain.run(pergunta)
|
| 93 |
-
|
| 94 |
-
# print("📌 Pergunta:", pergunta)
|
| 95 |
-
# print("🎩 Resposta do Analista Fiscal:\\n", resposta)
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
if __name__ == '__main__':
|
| 85 |
+
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|