Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,17 @@ import gradio as gr
|
|
| 2 |
from sentence_transformers import SentenceTransformer, util
|
| 3 |
import openai
|
| 4 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
| 7 |
|
|
@@ -108,7 +119,7 @@ def query_model(question):
|
|
| 108 |
|
| 109 |
# Define the welcome message and specific topics the chatbot can provide information about
|
| 110 |
welcome_message = """
|
| 111 |
-
<span style="color:#846A6A; font-size:90px; font-weight:bold; font-family: 'Silkscreen-Regular', sans-serif;
|
| 112 |
|
| 113 |
## Your AI-driven assistant for all videogame related queries. Created by Perennial, Jiya, and Ly-Ly of the 2024 Kode With Klossy San Francisco Camp.
|
| 114 |
"""
|
|
|
|
| 2 |
from sentence_transformers import SentenceTransformer, util
|
| 3 |
import openai
|
| 4 |
import os
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
from matplotlib import font_manager
|
| 7 |
+
|
| 8 |
+
# Specify the path to your downloaded font file
|
| 9 |
+
font_path = 'Silkscreen-Regular.ttf'
|
| 10 |
+
|
| 11 |
+
# Add the font to Matplotlib's font manager
|
| 12 |
+
font_manager.fontManager.addfont(font_path)
|
| 13 |
+
|
| 14 |
+
# Set the font as the default
|
| 15 |
+
plt.rcParams['font.family'] = font_manager.FontProperties(fname=font_path).get_name()
|
| 16 |
|
| 17 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
| 18 |
|
|
|
|
| 119 |
|
| 120 |
# Define the welcome message and specific topics the chatbot can provide information about
|
| 121 |
welcome_message = """
|
| 122 |
+
<span style="color:#846A6A; font-size:90px; font-weight:bold; font-family: 'Silkscreen-Regular', sans-serif;">🎮 Welcome to Plai!</span>
|
| 123 |
|
| 124 |
## Your AI-driven assistant for all videogame related queries. Created by Perennial, Jiya, and Ly-Ly of the 2024 Kode With Klossy San Francisco Camp.
|
| 125 |
"""
|