Update app.py
Browse files
app.py
CHANGED
@@ -75,13 +75,13 @@ def generate_response(user_query, relevant_segment):
|
|
75 |
messages.append({"role": "user", "content": user_message})
|
76 |
|
77 |
response = openai.ChatCompletion.create(
|
78 |
-
model="gpt-
|
79 |
messages=messages,
|
80 |
max_tokens=400,
|
81 |
-
temperature=0.
|
82 |
top_p=1,
|
83 |
-
frequency_penalty=0,
|
84 |
-
presence_penalty=0
|
85 |
)
|
86 |
|
87 |
# Extract the response text
|
@@ -113,10 +113,11 @@ welcome_message = """
|
|
113 |
<span style="color:#FFF4EA; font-size:90px; font-weight:bold;">˚˖𓍢ִ໋🌷͙֒✧ Welcome to Plai!͙֒˚.🎀༘⋆ .</span>
|
114 |
|
115 |
<span style="color:#fc6c85; font-size:40px; font-weight:light;">🫧𓍢ִ໋🍬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.</span>
|
116 |
-
|
117 |
-
topics = """
|
118 |
<span style="color:#AB4E68; font-size:30px; font-weight:bold;">𓍢ִ໋🌷͙֒₊˚*Feel Free to ask for Recommendations Based on the Topics Belowੈ🎀⸝⸝🍓⋆</span>
|
|
|
119 |
|
|
|
120 |
<span style="color:#A25F9D; font-size:20px; font-weight:light;">୭ 🧷 ✧ ˚. 🎀 Genre</span>
|
121 |
|
122 |
<span style="color:#A25F9D; font-size:20px; font-weight:light;">₊˚˖𓍢ִ🍓✧˚.🎀༘⋆゚Price</span>
|
@@ -147,9 +148,9 @@ theme = gr.themes.Base().set(
|
|
147 |
with gr.Blocks(theme=theme) as demo:
|
148 |
gr.Image("Video Game Banner.gif", show_label = False, show_share_button = False, show_download_button = False)
|
149 |
gr.Markdown(welcome_message) # Display the formatted welcome message
|
150 |
-
gr.Markdown(topics)
|
151 |
with gr.Row():
|
152 |
with gr.Column():
|
|
|
153 |
# Show the topics on the left side
|
154 |
gr.Image("Image.png", show_label = False, show_share_button = False, show_download_button = False, height=600, width=600 )
|
155 |
with gr.Row():
|
|
|
75 |
messages.append({"role": "user", "content": user_message})
|
76 |
|
77 |
response = openai.ChatCompletion.create(
|
78 |
+
model="gpt-4.0",
|
79 |
messages=messages,
|
80 |
max_tokens=400,
|
81 |
+
temperature=0.5,
|
82 |
top_p=1,
|
83 |
+
frequency_penalty=0.5,
|
84 |
+
presence_penalty=0.5
|
85 |
)
|
86 |
|
87 |
# Extract the response text
|
|
|
113 |
<span style="color:#FFF4EA; font-size:90px; font-weight:bold;">˚˖𓍢ִ໋🌷͙֒✧ Welcome to Plai!͙֒˚.🎀༘⋆ .</span>
|
114 |
|
115 |
<span style="color:#fc6c85; font-size:40px; font-weight:light;">🫧𓍢ִ໋🍬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.</span>
|
116 |
+
|
|
|
117 |
<span style="color:#AB4E68; font-size:30px; font-weight:bold;">𓍢ִ໋🌷͙֒₊˚*Feel Free to ask for Recommendations Based on the Topics Belowੈ🎀⸝⸝🍓⋆</span>
|
118 |
+
"""
|
119 |
|
120 |
+
topics = """
|
121 |
<span style="color:#A25F9D; font-size:20px; font-weight:light;">୭ 🧷 ✧ ˚. 🎀 Genre</span>
|
122 |
|
123 |
<span style="color:#A25F9D; font-size:20px; font-weight:light;">₊˚˖𓍢ִ🍓✧˚.🎀༘⋆゚Price</span>
|
|
|
148 |
with gr.Blocks(theme=theme) as demo:
|
149 |
gr.Image("Video Game Banner.gif", show_label = False, show_share_button = False, show_download_button = False)
|
150 |
gr.Markdown(welcome_message) # Display the formatted welcome message
|
|
|
151 |
with gr.Row():
|
152 |
with gr.Column():
|
153 |
+
gr.Markdown(topics)
|
154 |
# Show the topics on the left side
|
155 |
gr.Image("Image.png", show_label = False, show_share_button = False, show_download_button = False, height=600, width=600 )
|
156 |
with gr.Row():
|