Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ Using the following web search information:
|
|
| 33 |
{context}
|
| 34 |
|
| 35 |
Question: {query}
|
| 36 |
-
Answer
|
| 37 |
"""
|
| 38 |
|
| 39 |
response = llm.invoke(prompt)
|
|
@@ -49,17 +49,16 @@ body {
|
|
| 49 |
|
| 50 |
.gradio-container {
|
| 51 |
max-width: 900px !important;
|
| 52 |
-
margin-top:
|
| 53 |
}
|
| 54 |
|
| 55 |
-
/* BIG GOOGLE LOGO */
|
| 56 |
#logo {
|
| 57 |
-
font-size:
|
| 58 |
font-weight: 700;
|
| 59 |
text-align: center;
|
| 60 |
-
margin-bottom:
|
| 61 |
letter-spacing: -2px;
|
| 62 |
-
line-height: 1;
|
| 63 |
}
|
| 64 |
|
| 65 |
#logo span:nth-child(1) { color: #4285F4; }
|
|
@@ -69,10 +68,11 @@ body {
|
|
| 69 |
#logo span:nth-child(5) { color: #0F9D58; }
|
| 70 |
#logo span:nth-child(6) { color: #DB4437; }
|
| 71 |
|
|
|
|
| 72 |
.search-box textarea {
|
| 73 |
border-radius: 24px !important;
|
| 74 |
border: 1px solid #dfe1e5 !important;
|
| 75 |
-
padding:
|
| 76 |
font-size: 17px !important;
|
| 77 |
}
|
| 78 |
|
|
@@ -81,23 +81,26 @@ body {
|
|
| 81 |
border-color: transparent !important;
|
| 82 |
}
|
| 83 |
|
|
|
|
| 84 |
.search-btn button {
|
| 85 |
border-radius: 6px !important;
|
| 86 |
background-color: #f8f9fa !important;
|
| 87 |
color: #202124 !important;
|
| 88 |
border: 1px solid #f8f9fa !important;
|
| 89 |
font-weight: 500;
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
.search-btn button:hover {
|
| 93 |
border: 1px solid #dadce0 !important;
|
| 94 |
}
|
| 95 |
|
|
|
|
| 96 |
.answer-box textarea {
|
| 97 |
border-radius: 12px !important;
|
| 98 |
background: #f8f9fa !important;
|
| 99 |
font-size: 15px !important;
|
| 100 |
-
line-height: 1.
|
| 101 |
}
|
| 102 |
"""
|
| 103 |
|
|
@@ -106,7 +109,8 @@ with gr.Blocks(css=google_css) as demo:
|
|
| 106 |
gr.Markdown(
|
| 107 |
"""
|
| 108 |
<div id="logo">
|
| 109 |
-
<span>G</span><span>o</span><span>o</span
|
|
|
|
| 110 |
</div>
|
| 111 |
""",
|
| 112 |
elem_id="logo"
|
|
|
|
| 33 |
{context}
|
| 34 |
|
| 35 |
Question: {query}
|
| 36 |
+
Answer clearly and concisely like Google Search:
|
| 37 |
"""
|
| 38 |
|
| 39 |
response = llm.invoke(prompt)
|
|
|
|
| 49 |
|
| 50 |
.gradio-container {
|
| 51 |
max-width: 900px !important;
|
| 52 |
+
margin-top: 40px;
|
| 53 |
}
|
| 54 |
|
|
|
|
| 55 |
#logo {
|
| 56 |
+
font-size: 96px;
|
| 57 |
font-weight: 700;
|
| 58 |
text-align: center;
|
| 59 |
+
margin-bottom: 45px;
|
| 60 |
letter-spacing: -2px;
|
| 61 |
+
line-height: 1.1;
|
| 62 |
}
|
| 63 |
|
| 64 |
#logo span:nth-child(1) { color: #4285F4; }
|
|
|
|
| 68 |
#logo span:nth-child(5) { color: #0F9D58; }
|
| 69 |
#logo span:nth-child(6) { color: #DB4437; }
|
| 70 |
|
| 71 |
+
/* Search box */
|
| 72 |
.search-box textarea {
|
| 73 |
border-radius: 24px !important;
|
| 74 |
border: 1px solid #dfe1e5 !important;
|
| 75 |
+
padding: 16px 22px !important;
|
| 76 |
font-size: 17px !important;
|
| 77 |
}
|
| 78 |
|
|
|
|
| 81 |
border-color: transparent !important;
|
| 82 |
}
|
| 83 |
|
| 84 |
+
/* Button */
|
| 85 |
.search-btn button {
|
| 86 |
border-radius: 6px !important;
|
| 87 |
background-color: #f8f9fa !important;
|
| 88 |
color: #202124 !important;
|
| 89 |
border: 1px solid #f8f9fa !important;
|
| 90 |
font-weight: 500;
|
| 91 |
+
padding: 10px 18px;
|
| 92 |
}
|
| 93 |
|
| 94 |
.search-btn button:hover {
|
| 95 |
border: 1px solid #dadce0 !important;
|
| 96 |
}
|
| 97 |
|
| 98 |
+
/* Answer box */
|
| 99 |
.answer-box textarea {
|
| 100 |
border-radius: 12px !important;
|
| 101 |
background: #f8f9fa !important;
|
| 102 |
font-size: 15px !important;
|
| 103 |
+
line-height: 1.7;
|
| 104 |
}
|
| 105 |
"""
|
| 106 |
|
|
|
|
| 109 |
gr.Markdown(
|
| 110 |
"""
|
| 111 |
<div id="logo">
|
| 112 |
+
<span>G</span><span>o</span><span>o</span>
|
| 113 |
+
<span>g</span><span>l</span><span>e</span>
|
| 114 |
</div>
|
| 115 |
""",
|
| 116 |
elem_id="logo"
|