Spaces:
Runtime error
Runtime error
fixed image+button tgther/theme
Browse files
app.py
CHANGED
|
@@ -43,7 +43,19 @@ def get_relevant_context(query, top_k=3):
|
|
| 43 |
context = "\n\n".join([chunks[i] for i in top_k_indices])
|
| 44 |
return context
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
client = InferenceClient("google/gemma-2-2b-it")
|
| 48 |
|
| 49 |
|
|
@@ -81,15 +93,14 @@ def respond(message, history):
|
|
| 81 |
response += token # Add it to the response
|
| 82 |
yield response # yield the response:
|
| 83 |
|
| 84 |
-
chatbot = gr.ChatInterface(respond, examples = ["Teach Me About Stocks", "Help Me Budget"], title = "ChaChingas", description = "This is a financial literacy chatbot")
|
| 85 |
|
| 86 |
-
|
| 87 |
-
gr.Image(
|
| 88 |
value = "Banner.png",
|
| 89 |
show_label = False,
|
| 90 |
show_share_button= False,
|
| 91 |
-
show_download_button= False
|
| 92 |
-
|
|
|
|
| 93 |
|
| 94 |
|
| 95 |
|
|
|
|
| 43 |
context = "\n\n".join([chunks[i] for i in top_k_indices])
|
| 44 |
return context
|
| 45 |
|
| 46 |
+
|
| 47 |
+
custom_theme = gr.themes.Soft(
|
| 48 |
+
primary_hue="teal",
|
| 49 |
+
secondary_hue="stone",
|
| 50 |
+
neutral_hue="gray",
|
| 51 |
+
spacing_size="lg",
|
| 52 |
+
radius_size="lg",
|
| 53 |
+
text_size="lg",
|
| 54 |
+
font=[gr.themes.GoogleFont("Times New Roman"), "sans-serif"],
|
| 55 |
+
font_mono=[gr.themes.GoogleFont("Times New Roman"), "monospace"]
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
|
| 59 |
client = InferenceClient("google/gemma-2-2b-it")
|
| 60 |
|
| 61 |
|
|
|
|
| 93 |
response += token # Add it to the response
|
| 94 |
yield response # yield the response:
|
| 95 |
|
|
|
|
| 96 |
|
| 97 |
+
gr.Image(
|
|
|
|
| 98 |
value = "Banner.png",
|
| 99 |
show_label = False,
|
| 100 |
show_share_button= False,
|
| 101 |
+
show_download_button= False)
|
| 102 |
+
|
| 103 |
+
chatbot = gr.ChatInterface(respond, examples = ["Teach Me About Stocks", "Help Me Budget"], title = "ChaChingas", description = "This is a financial literacy chatbot")
|
| 104 |
|
| 105 |
|
| 106 |
|