Spaces:
Runtime error
Runtime error
Dagfinn1962
commited on
Commit
•
53b2750
1
Parent(s):
207dd56
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,25 @@
|
|
1 |
import time
|
2 |
import logging
|
3 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
from src.llm_boilers import llm_boiler
|
6 |
|
7 |
|
8 |
logging.basicConfig(format="%(asctime)s - %(message)s", level=logging.INFO)
|
@@ -111,10 +128,12 @@ def call_inf_server(prompt, openai_key):
|
|
111 |
return response
|
112 |
|
113 |
|
114 |
-
gr.Blocks(
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
118 |
|
119 |
This is a lightweight demo of gpt-3.5-turbo conversation completion. It was designed as a template for in-context learning applications to be built on top of.
|
120 |
"""
|
|
|
1 |
import time
|
2 |
import logging
|
3 |
import gradio as gr
|
4 |
+
theme = gr.themes.Glass(
|
5 |
+
primary_hue="yellow",
|
6 |
+
secondary_hue=gr.themes.Color(secondary_100="#736c1c", secondary_200="#716823", secondary_300="#fde047", secondary_400="#facc15", secondary_50="#f2e821", secondary_500="#eab308", secondary_600="#ca8a04", secondary_700="#a16207", secondary_800="#854d0e", secondary_900="#713f12", secondary_950="#653b12"),
|
7 |
+
neutral_hue=gr.themes.Color(neutral_100="#2a1304", neutral_200="#e7e5e4", neutral_300="#d6d3d1", neutral_400="#a8a29e", neutral_50="#97ae29", neutral_500="#78716c", neutral_600="#57534e", neutral_700="#44403c", neutral_800="#292524", neutral_900="#1c1917", neutral_950="#0f0e0d"),
|
8 |
+
text_size="text_lg",
|
9 |
+
spacing_size="spacing_md",
|
10 |
+
radius_size=gr.themes.Size(radius_lg="8px", radius_md="6px", radius_sm="4px", radius_xl="12px", radius_xs="2px", radius_xxl="22px", radius_xxs="5px"),
|
11 |
+
font=[gr.themes.GoogleFont('Optima'), gr.themes.GoogleFont('Candara'), gr.themes.GoogleFont('Noto Sans'), gr.themes.GoogleFont('source-sans-pro')],
|
12 |
+
font_mono=[gr.themes.GoogleFont('IBM Plex Mono'), gr.themes.GoogleFont('ui-monospace'), gr.themes.GoogleFont('Consolas'), gr.themes.GoogleFont('monospace')],
|
13 |
+
).set(
|
14 |
+
body_background_fill='*primary_500',
|
15 |
+
body_background_fill_dark='*primary_50',
|
16 |
+
background_fill_primary='*primary_50',
|
17 |
+
background_fill_primary_dark='*primary_50'
|
18 |
+
)
|
19 |
+
with gr.Blocks(theme=theme) as demo:
|
20 |
+
|
21 |
+
|
22 |
|
|
|
23 |
|
24 |
|
25 |
logging.basicConfig(format="%(asctime)s - %(message)s", level=logging.INFO)
|
|
|
128 |
return response
|
129 |
|
130 |
|
131 |
+
with gr.Blocks(
|
132 |
+
theme=gr.themes.Soft(),
|
133 |
+
css=".disclaimer {font-variant-caps: all-small-caps;}",
|
134 |
+
) as demo:
|
135 |
+
gr.Markdown(
|
136 |
+
"""<h1><center>Chat with gpt-3.5-turbo</center></h1>
|
137 |
|
138 |
This is a lightweight demo of gpt-3.5-turbo conversation completion. It was designed as a template for in-context learning applications to be built on top of.
|
139 |
"""
|