Added app.py
Browse files
app.py
CHANGED
|
@@ -45,8 +45,8 @@ def chatbot(user_query):
|
|
| 45 |
|
| 46 |
iface = gr.Interface(
|
| 47 |
fn=chatbot,
|
| 48 |
-
inputs="
|
| 49 |
-
outputs="
|
| 50 |
title="MedChat: Your Medicine Assistant",
|
| 51 |
description=(
|
| 52 |
"Welcome to MedChat! Ask me about any medicine and get accurate and relevant information. "
|
|
@@ -59,6 +59,24 @@ iface = gr.Interface(
|
|
| 59 |
"What is the dosage for Amoxicillin?"
|
| 60 |
],
|
| 61 |
live=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
if __name__ == "__main__":
|
|
|
|
| 45 |
|
| 46 |
iface = gr.Interface(
|
| 47 |
fn=chatbot,
|
| 48 |
+
inputs=gr.Textbox(label="Enter your query here:", placeholder="Type your question...", lines=2, interactive=True),
|
| 49 |
+
outputs=gr.Textbox(label="Response:", lines=4, interactive=False),
|
| 50 |
title="MedChat: Your Medicine Assistant",
|
| 51 |
description=(
|
| 52 |
"Welcome to MedChat! Ask me about any medicine and get accurate and relevant information. "
|
|
|
|
| 59 |
"What is the dosage for Amoxicillin?"
|
| 60 |
],
|
| 61 |
live=True,
|
| 62 |
+
layout="vertical",
|
| 63 |
+
css="""
|
| 64 |
+
.gradio-container {
|
| 65 |
+
display: flex;
|
| 66 |
+
flex-direction: column;
|
| 67 |
+
justify-content: center;
|
| 68 |
+
align-items: center;
|
| 69 |
+
min-height: 100vh;
|
| 70 |
+
background-color: #f9f9f9;
|
| 71 |
+
}
|
| 72 |
+
.gr-input-box {
|
| 73 |
+
width: 60%;
|
| 74 |
+
margin-bottom: 10px;
|
| 75 |
+
}
|
| 76 |
+
.gr-output-box {
|
| 77 |
+
width: 60%;
|
| 78 |
+
}
|
| 79 |
+
"""
|
| 80 |
)
|
| 81 |
|
| 82 |
if __name__ == "__main__":
|