saritha commited on
Commit
801cf0e
1 Parent(s): 1a19f3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import os
2
  import gradio as gr
3
  import asyncio
4
- from langchain import PromptTemplate
5
- from langchain.chains.question_answering import load_qa_chain
6
- from langchain.document_loaders import PyPDFLoader
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
  import google.generativeai as genai
9
 
@@ -42,5 +42,3 @@ async def pdf_qa(file, question):
42
 
43
  # Create Gradio Interface
44
  gr.Interface(fn=pdf_qa, inputs=[input_file, input_question], outputs=output_text, title="PDF Question Answering System", description="Upload a PDF file and ask questions about the content.").launch()
45
-
46
-
 
1
  import os
2
  import gradio as gr
3
  import asyncio
4
+ from langchain_core.prompts import PromptTemplate
5
+ from langchain_community.output_parsers.rail_parser import GuardrailsOutputParser
6
+ from langchain_community.document_loaders import PyPDFLoader
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
  import google.generativeai as genai
9
 
 
42
 
43
  # Create Gradio Interface
44
  gr.Interface(fn=pdf_qa, inputs=[input_file, input_question], outputs=output_text, title="PDF Question Answering System", description="Upload a PDF file and ask questions about the content.").launch()