Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
•
74b4e24
1
Parent(s):
7743097
Update app.py
Browse files
app.py
CHANGED
@@ -319,7 +319,9 @@ def main():
|
|
319 |
# greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
320 |
with gr.Accordion("Info", open=False):
|
321 |
_ = """
|
322 |
-
|
|
|
|
|
323 |
takes quite a while to ingest docs (10-30 min. depending
|
324 |
on net, RAM, CPU etc.).
|
325 |
"""
|
@@ -330,7 +332,7 @@ def main():
|
|
330 |
# Upload files and generate embeddings database
|
331 |
file_output = gr.File()
|
332 |
upload_button = gr.UploadButton(
|
333 |
-
"Click to upload files",
|
334 |
# file_types=["*.pdf", "*.epub", "*.docx"],
|
335 |
file_count="multiple",
|
336 |
)
|
@@ -345,7 +347,7 @@ def main():
|
|
345 |
def respond(message, chat_history):
|
346 |
# bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
|
347 |
if ns.qa is None: # no files processed yet
|
348 |
-
bot_message = "
|
349 |
chat_history.append((message, bot_message))
|
350 |
return "", chat_history
|
351 |
try:
|
|
|
319 |
# greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
320 |
with gr.Accordion("Info", open=False):
|
321 |
_ = """
|
322 |
+
# localgpt
|
323 |
+
Talk to your docs (.pdf, .docx, .epub, .txt .md and
|
324 |
+
other text docs). It
|
325 |
takes quite a while to ingest docs (10-30 min. depending
|
326 |
on net, RAM, CPU etc.).
|
327 |
"""
|
|
|
332 |
# Upload files and generate embeddings database
|
333 |
file_output = gr.File()
|
334 |
upload_button = gr.UploadButton(
|
335 |
+
"Click to upload files (Hold ctrl and click to select multiple files)",
|
336 |
# file_types=["*.pdf", "*.epub", "*.docx"],
|
337 |
file_count="multiple",
|
338 |
)
|
|
|
347 |
def respond(message, chat_history):
|
348 |
# bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
|
349 |
if ns.qa is None: # no files processed yet
|
350 |
+
bot_message = "Upload some file(s) for processing first."
|
351 |
chat_history.append((message, bot_message))
|
352 |
return "", chat_history
|
353 |
try:
|