Zayed024 commited on
Commit
cfc5da5
1 Parent(s): c1780f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -119,3 +119,20 @@ def chunk_long_sentence(sentence):
119
  chunks.append(' '.join(current_chunk))
120
 
121
  return chunks
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  chunks.append(' '.join(current_chunk))
120
 
121
  return chunks
122
+
123
+ iface = gr.Interface(
124
+ fn=process_pdf_and_generate_response,
125
+ inputs=[
126
+ gr.File(label="Upload PDF Document"),
127
+ gr.Textbox(label="Query", placeholder="Enter your query here...")
128
+ ],
129
+ outputs=gr.Textbox(label="Response"),
130
+ title="AI-Driven Research Engine for Commercial Courts",
131
+ description="Upload a PDF document and ask a question to get a response generated based on the content of the document."
132
+ )
133
+
134
+ # Launch the interface
135
+ if __name__=="__main__":
136
+
137
+
138
+ iface.launch(share=True)