Spaces:
Sleeping
Sleeping
peterkchung
commited on
Commit
•
6274930
1
Parent(s):
df293a9
UPDATE format for dd
Browse files
app.py
CHANGED
@@ -98,59 +98,65 @@ def retry_query(
|
|
98 |
|
99 |
"""
|
100 |
Chat UI using Gradio Blocks.
|
101 |
-
Blocks preferred for "lower-level" layout control and state management.
|
102 |
-
TODOs:
|
103 |
-
- State management for dynamic components update.
|
104 |
-
- Add scratchpad readout to the right of chat log.
|
105 |
-
* Placeholder added for now.
|
106 |
-
- Add functionality to retry button.
|
107 |
-
* Placeholder added for now.
|
108 |
-
- Add dropdown for model selection.
|
109 |
-
* Placeholder added for now.
|
110 |
|
111 |
"""
|
112 |
|
113 |
with gr.Blocks() as chatUI:
|
114 |
# gr.State()
|
115 |
-
|
116 |
-
with gr.
|
117 |
-
|
118 |
-
|
119 |
-
scale = 0.5,
|
120 |
)
|
121 |
-
|
122 |
-
with gr.
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
bubble_full_width = False,
|
125 |
scale = 2
|
126 |
)
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
queryInput = gr.Textbox(
|
131 |
placeholder = "Please enter you question or request here...",
|
132 |
show_label = False,
|
133 |
scale = 4,
|
134 |
)
|
135 |
-
submitButton = gr.Button("Submit", scale = 1)
|
136 |
|
137 |
-
|
138 |
-
fileUpload = gr.File(
|
139 |
-
height = 100,
|
140 |
-
)
|
141 |
-
retryButton = gr.Button("Retry")
|
142 |
-
clearButton = gr.ClearButton([queryInput, chatOutput])
|
143 |
|
144 |
-
with gr.
|
145 |
-
with gr.
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
)
|
152 |
-
|
153 |
|
|
|
154 |
"""
|
155 |
Event functions
|
156 |
|
|
|
98 |
|
99 |
"""
|
100 |
Chat UI using Gradio Blocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
"""
|
103 |
|
104 |
with gr.Blocks() as chatUI:
|
105 |
# gr.State()
|
106 |
+
|
107 |
+
with gr.Column():
|
108 |
+
gr.Markdown(
|
109 |
+
|
|
|
110 |
)
|
111 |
+
|
112 |
+
with gr.Column():
|
113 |
+
with gr.Row():
|
114 |
+
marketFeed = gr.Textbox(
|
115 |
+
|
116 |
+
)
|
117 |
+
|
118 |
+
with gr.Row():
|
119 |
+
with gr.Group():
|
120 |
+
tickerInput = gr.Textbox(
|
121 |
+
placeholder = "Please enter you question or request here...",
|
122 |
+
show_label = False,
|
123 |
+
scale = 2,
|
124 |
+
)
|
125 |
+
|
126 |
+
tickerSubmit = gr.Button("Submit", scale = 1)
|
127 |
+
|
128 |
+
with gr.Row():
|
129 |
+
chatOutput = gr.Chatbot(
|
130 |
bubble_full_width = False,
|
131 |
scale = 2
|
132 |
)
|
133 |
+
|
134 |
+
with gr.Row():
|
135 |
+
queryInput = gr.Textbox(
|
|
|
136 |
placeholder = "Please enter you question or request here...",
|
137 |
show_label = False,
|
138 |
scale = 4,
|
139 |
)
|
|
|
140 |
|
141 |
+
querySubmit = gr.Button("Submit", scale = 1)
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
+
with gr.Column():
|
144 |
+
with gr.Row():
|
145 |
+
companyInfo = gr.Markdown(
|
146 |
+
|
147 |
+
)
|
148 |
+
|
149 |
+
with gr.Row():
|
150 |
+
companyBull = gr.Markdown(
|
151 |
+
|
152 |
+
)
|
153 |
+
|
154 |
+
with gr.Row():
|
155 |
+
companyBear = gr.Markdown(
|
156 |
+
|
157 |
)
|
|
|
158 |
|
159 |
+
|
160 |
"""
|
161 |
Event functions
|
162 |
|