Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -361,16 +361,21 @@ def chatbot_interface(file, user_query, response_style):
|
|
361 |
formatted_response += f"{key.replace('_', ' ').title()}: {value:.4f}\n"
|
362 |
|
363 |
return formatted_response
|
364 |
-
iface = gr.
|
|
|
|
|
|
|
365 |
fn=chatbot_interface,
|
366 |
-
theme=
|
|
|
367 |
inputs=[
|
368 |
-
gr.File(label="Upload a File"),
|
369 |
gr.Textbox(lines=5, label="User Query"),
|
370 |
-
gr.Dropdown(
|
|
|
|
|
371 |
],
|
372 |
outputs=gr.Textbox(label="ChanceRAG Response"),
|
373 |
-
title="Chance RAG",
|
374 |
)
|
375 |
|
376 |
iface.launch(share=True)
|
|
|
361 |
formatted_response += f"{key.replace('_', ' ').title()}: {value:.4f}\n"
|
362 |
|
363 |
return formatted_response
|
364 |
+
iface = gr.Blocks(theme="Rabbitt-AI/ChanceRAG")
|
365 |
+
with iface:
|
366 |
+
gr.Image("/content/chanceRAG_logo.png", label="Image", show_label = False)
|
367 |
+
gr.Interface(
|
368 |
fn=chatbot_interface,
|
369 |
+
theme="Rabbitt-AI/ChanceRAG",
|
370 |
+
|
371 |
inputs=[
|
372 |
+
gr.File(label="Upload a File"),
|
373 |
gr.Textbox(lines=5, label="User Query"),
|
374 |
+
gr.Dropdown(
|
375 |
+
["Detailed", "Concise", "Creative", "Technical"], label="Retreival Style"
|
376 |
+
),
|
377 |
],
|
378 |
outputs=gr.Textbox(label="ChanceRAG Response"),
|
|
|
379 |
)
|
380 |
|
381 |
iface.launch(share=True)
|