sotirios-slv commited on
Commit
e715043
1 Parent(s): 433f502

Updated to use blocks

Browse files
Files changed (1) hide show
  1. app.py +29 -24
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
- <img src="/file=val_speaking_transparent.gif" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; ">
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.Image("/file=val_speaking_transparent.gif")
104
- gr.Markdown("Hi I'm Val the Voyager, welcome onboard!")
105
- gr.ChatInterface(
106
- fn=generate,
107
- chatbot=gr.Chatbot(
108
- show_label=False,
109
- show_share_button=False,
110
- show_copy_button=True,
111
- likeable=True,
112
- layout="panel",
113
- placeholder=PLACEHOLDER,
114
- ),
115
- additional_inputs=additional_inputs,
116
- examples=[
117
- ["Ask me what an acronym stands for"],
118
- ["How can I check my leave allowance?"],
119
- ["Where can I find a floor map of 1 Macarthur?"],
120
- ["How can I find out about DTF's Disability network?"],
121
- ],
122
- cache_examples=False,
123
- title="""Voyager Val""",
124
- ).launch(show_api=False)
 
 
 
 
 
 
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()