Spaces:
Runtime error
Runtime error
sotirios-slv
commited on
Commit
•
e715043
1
Parent(s):
433f502
Updated to use blocks
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import gradio as gr
|
|
3 |
|
4 |
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1")
|
5 |
|
6 |
-
|
7 |
PLACEHOLDER = """
|
8 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
9 |
-
|
10 |
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">Hi Jennifer, welcome to DTF</h1>
|
11 |
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Ask me anything about working at here...</p>
|
12 |
</div>.
|
@@ -100,25 +100,30 @@ additional_inputs = [
|
|
100 |
),
|
101 |
]
|
102 |
|
103 |
-
gr.
|
104 |
-
|
105 |
-
gr.
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
[
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1")
|
5 |
|
6 |
+
# <img src="/file=val_speaking_transparent.gif" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; ">
|
7 |
PLACEHOLDER = """
|
8 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
9 |
+
|
10 |
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">Hi Jennifer, welcome to DTF</h1>
|
11 |
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Ask me anything about working at here...</p>
|
12 |
</div>.
|
|
|
100 |
),
|
101 |
]
|
102 |
|
103 |
+
with gr.Blocks(fill_height=True) as demo:
|
104 |
+
|
105 |
+
gr.Image("/file=val_speaking_transparent.gif")
|
106 |
+
gr.Markdown("Hi I'm Val the Voyager, welcome onboard!")
|
107 |
+
gr.ChatInterface(
|
108 |
+
fn=generate,
|
109 |
+
chatbot=gr.Chatbot(
|
110 |
+
show_label=False,
|
111 |
+
show_share_button=False,
|
112 |
+
show_copy_button=True,
|
113 |
+
likeable=True,
|
114 |
+
layout="panel",
|
115 |
+
placeholder=PLACEHOLDER,
|
116 |
+
),
|
117 |
+
additional_inputs=additional_inputs,
|
118 |
+
examples=[
|
119 |
+
["Ask me what an acronym stands for"],
|
120 |
+
["How can I check my leave allowance?"],
|
121 |
+
["Where can I find a floor map of 1 Macarthur?"],
|
122 |
+
["How can I find out about DTF's Disability network?"],
|
123 |
+
],
|
124 |
+
cache_examples=False,
|
125 |
+
title="""Voyager Val""",
|
126 |
+
)
|
127 |
+
|
128 |
+
if __name__ == "__main__":
|
129 |
+
demo.launch()
|