Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,25 +124,11 @@ def query_doc(prompt):
|
|
| 124 |
except Exception as e:
|
| 125 |
return f"Error: {str(e)}"
|
| 126 |
|
| 127 |
-
custom_css = """
|
| 128 |
-
footer {display:none !important;}
|
| 129 |
-
.gradio-container {
|
| 130 |
-
max-width: 900px !important;
|
| 131 |
-
margin: auto !important;
|
| 132 |
-
}
|
| 133 |
-
"""
|
| 134 |
-
|
| 135 |
-
demo = gr.ChatInterface(
|
| 136 |
-
fn=query_doc,
|
| 137 |
-
title="🤖 DDS Enterprise HR Assistant",
|
| 138 |
-
description="Get the latest HR information instantly.",
|
| 139 |
-
theme=gr.themes.Soft(),
|
| 140 |
-
css=custom_css,
|
| 141 |
-
examples=[
|
| 142 |
-
"What is the leave policy?",
|
| 143 |
-
"How can I claim medical expenses?",
|
| 144 |
-
"What are office working hours?"
|
| 145 |
-
]
|
| 146 |
-
)
|
| 147 |
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
except Exception as e:
|
| 125 |
return f"Error: {str(e)}"
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
+
gr.Interface(
|
| 129 |
+
fn=query_doc,
|
| 130 |
+
inputs=gr.Textbox(label="Ask a question about the document"),
|
| 131 |
+
outputs=gr.Textbox(label="Answer"),
|
| 132 |
+
title="DDS Enterprise Chatbot",
|
| 133 |
+
description="Ask questions related to HR for latest Information."
|
| 134 |
+
).launch(share=True)
|