Spaces:
Sleeping
Sleeping
Commit
·
548b964
1
Parent(s):
e963fa4
adding app
Browse files- app.py +1 -54
- requirements.txt +0 -2
app.py
CHANGED
@@ -136,57 +136,4 @@ iface = gr.Interface(
|
|
136 |
description ="Summarize your PDF Document having Image • HuggingFace",
|
137 |
)
|
138 |
|
139 |
-
iface.launch()
|
140 |
-
|
141 |
-
# with gr.Blocks(css=css) as demo:
|
142 |
-
# with gr.Column(elem_id="col-container"):
|
143 |
-
# gr.HTML(title)
|
144 |
-
|
145 |
-
# with gr.Group():
|
146 |
-
# chatbot = gr.Chatbot(height=300)
|
147 |
-
# with gr.Row():
|
148 |
-
# sumarize_btn = gr.Button(value="Summarize", variant="primary", scale = 1)
|
149 |
-
# clean_chat_btn = gr.Button("Delete Chat")
|
150 |
-
|
151 |
-
# with gr.Column():
|
152 |
-
# LLM_option = gr.Dropdown(['tiiuae/falcon-7b-instruct','mistralai/Mistral-7B-v0.1'],label='Large Language Model Selection',info='LLM Service')
|
153 |
-
|
154 |
-
# with gr.Column():
|
155 |
-
# with gr.Box():
|
156 |
-
# file_extension = gr.Dropdown(FILE_EXT, label="File Extensions", info="Select type of file to upload !")
|
157 |
-
# pdf_doc = gr.File(label="Upload File", file_types=FILE_EXT, type="file")
|
158 |
-
# with gr.Accordion(label='Advanced options', open=False):
|
159 |
-
# max_new_tokens = gr.Slider(
|
160 |
-
# label='Max new tokens',
|
161 |
-
# minimum=512,
|
162 |
-
# maximum=MAX_NEW_TOKENS,
|
163 |
-
# step=1024,
|
164 |
-
# value=DEFAULT_MAX_NEW_TOKENS,
|
165 |
-
# )
|
166 |
-
# temperature = gr.Slider(
|
167 |
-
# label='Temperature',
|
168 |
-
# minimum=0.01,
|
169 |
-
# maximum=1.0,
|
170 |
-
# step=0.05,
|
171 |
-
# value=DEFAULT_TEMPERATURE,
|
172 |
-
# )
|
173 |
-
# with gr.Row():
|
174 |
-
# langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
|
175 |
-
# load_pdf = gr.Button("Upload File & Generate Embeddings",).style(full_width = False)
|
176 |
-
|
177 |
-
# # chatbot = gr.Chatbot()l̥
|
178 |
-
# # question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter")
|
179 |
-
# # submit_button = gr.Button("Send Message")
|
180 |
-
|
181 |
-
# if pdf_doc:
|
182 |
-
# load_pdf.click(loading_file, None, langchain_status, queue=False)
|
183 |
-
# load_pdf.click(document_loader, inputs=[pdf_doc,file_extension,temperature,max_new_tokens], outputs=[langchain_status], queue=False)
|
184 |
-
|
185 |
-
# #question.submit(add_text, inputs=[chatbot, question], outputs=[chatbot, question]).then(bot, chatbot, chatbot)
|
186 |
-
# #submit_btn.click(add_text, inputs=[chatbot, question], outputs=[chatbot, question]).then(bot, chatbot, chatbot)
|
187 |
-
# sumarize_btn.click()
|
188 |
-
# # submit_btn.then(chatf.highlight_found_text, [chatbot, sources], [sources])
|
189 |
-
# clean_chat_btn.click(clear_chat, [], chatbot)
|
190 |
-
|
191 |
-
|
192 |
-
# demo.launch()
|
|
|
136 |
description ="Summarize your PDF Document having Image • HuggingFace",
|
137 |
)
|
138 |
|
139 |
+
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -9,6 +9,4 @@ torch
|
|
9 |
faiss-cpu
|
10 |
sentence-transformers
|
11 |
chromadb
|
12 |
-
bitsandbytes
|
13 |
-
accelerate
|
14 |
doctr
|
|
|
9 |
faiss-cpu
|
10 |
sentence-transformers
|
11 |
chromadb
|
|
|
|
|
12 |
doctr
|