Spaces:
Runtime error
Runtime error
Dagfinn1962
commited on
Commit
•
fde3892
1
Parent(s):
1a7ca47
Update app.py
Browse files
app.py
CHANGED
@@ -7,13 +7,6 @@ logging.basicConfig(format="%(asctime)s - %(message)s", level=logging.INFO)
|
|
7 |
logging.warning("READY. App started...")
|
8 |
|
9 |
|
10 |
-
theme = gr.themes.Glass(
|
11 |
-
primary_hue="orange",
|
12 |
-
secondary_hue="neutral",
|
13 |
-
neutral_hue=gr.themes.Color(neutral_100="#ffedd5", neutral_200="#32271a", neutral_300="#fdba74", neutral_400="#fb923c", neutral_50="#fff7ed", neutral_500="#f97316", neutral_600="#ea580c", neutral_700="#c2410c", neutral_800="#9a3412", neutral_900="#7c2d12", neutral_950="#6c2e12"),
|
14 |
-
)
|
15 |
-
|
16 |
-
with gr.Blocks(theme=theme) as demo:
|
17 |
class Chat:
|
18 |
default_system_prompt = "A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers."
|
19 |
system_format = "<|im_start|>system\n{}<|im_end|>\n"
|
@@ -115,10 +108,11 @@ def call_inf_server(prompt, openai_key):
|
|
115 |
logging.warning(f"Result of text generation: {response}")
|
116 |
return response
|
117 |
|
118 |
-
|
119 |
-
with gr.Blocks(
|
120 |
-
|
121 |
-
|
|
|
122 |
gr.Markdown(
|
123 |
"""<h1><center>Chat with gpt-3.5-turbo</center></h1>
|
124 |
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.
|
@@ -145,7 +139,7 @@ with gr.Blocks(theme=theme)as demo:
|
|
145 |
).style(container=False)
|
146 |
with gr.Column():
|
147 |
with gr.Row():
|
148 |
-
submit = gr.Button("
|
149 |
stop = gr.Button("Stop")
|
150 |
clear = gr.Button("Clear")
|
151 |
with gr.Row():
|
|
|
7 |
logging.warning("READY. App started...")
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class Chat:
|
11 |
default_system_prompt = "A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers."
|
12 |
system_format = "<|im_start|>system\n{}<|im_end|>\n"
|
|
|
108 |
logging.warning(f"Result of text generation: {response}")
|
109 |
return response
|
110 |
|
111 |
+
# FROM HERE ----->
|
112 |
+
with gr.Blocks(
|
113 |
+
theme=gr.themes.Glass(),
|
114 |
+
css=".disclaimer {font-variant-caps: all-small-caps;}",
|
115 |
+
) as demo:
|
116 |
gr.Markdown(
|
117 |
"""<h1><center>Chat with gpt-3.5-turbo</center></h1>
|
118 |
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 |
).style(container=False)
|
140 |
with gr.Column():
|
141 |
with gr.Row():
|
142 |
+
submit = gr.Button("Submit")
|
143 |
stop = gr.Button("Stop")
|
144 |
clear = gr.Button("Clear")
|
145 |
with gr.Row():
|