Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def chatbot(input_text):
|
|
49 |
|
50 |
|
51 |
with gr.Blocks() as demo:
|
52 |
-
gpt = gr.Chatbot(label="GPT SUPEr", elem_id="chatbot").style(height=
|
53 |
msg = gr.Textbox( show_label=False,
|
54 |
placeholder="Bem vindo ao ExpoSuper, Qual sua pergunta?",
|
55 |
).style(container=False)
|
@@ -62,7 +62,8 @@ with gr.Blocks() as demo:
|
|
62 |
realPath = str(os.path.dirname(os.path.realpath(__file__)))
|
63 |
|
64 |
if str(message).upper()=="OLA" or str(message).upper()=="OLÁ" or str(message).upper()=="OI":
|
65 |
-
vetor = vetor + [
|
|
|
66 |
else:
|
67 |
if str(message).upper() == "PROGRAMACAO DIA 20" \
|
68 |
or str(message).upper() == "PROGRAMACAO DIA 20" \
|
@@ -76,6 +77,7 @@ with gr.Blocks() as demo:
|
|
76 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
77 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
78 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
79 |
elif str(message).upper() == "AGENDA PARA O DIA 20" or str(message).upper() == "AGENDA PARA O DIA 20" or str(message).upper() == "QUAL A AGENDA DO DIA 20?":
|
80 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
81 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -85,6 +87,8 @@ with gr.Blocks() as demo:
|
|
85 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
86 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
87 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
88 |
elif str(message).upper() == "EVENTOS DO DIA 20" or str(message).upper() == "EVENTOS DO DIA 20" or str(message).upper() == "QUAIS OS EVENTOS DO DIA 20?":
|
89 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
90 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -94,6 +98,8 @@ with gr.Blocks() as demo:
|
|
94 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
95 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
96 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
97 |
elif str(message).upper() == "ATIVIDADES PROGRAMADAS PARA O DIA 20" or str(message).upper() == "ATIVIDADES PROGRAMADAS PARA O DIA 20" or str(message).upper() == "QUAIS AS ATIVIDADES PROGRAMADAS PARA O DIA 20?":
|
98 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
99 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -103,6 +109,8 @@ with gr.Blocks() as demo:
|
|
103 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
104 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
105 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
106 |
elif str(message).upper() == "CRONOGRAMA PARA O DIA 20" or str(message).upper() == "CRONOGRAMA PARA O DIA 20" or str(message).upper() == "QUAL O CRONOGRAMA PARA O DIA 20?":
|
107 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
108 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -112,6 +120,8 @@ with gr.Blocks() as demo:
|
|
112 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
113 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
114 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
115 |
elif str(message).upper() == "CALENDARIO PARA O DIA 20" or str(message).upper() == "CALENDARIO PARA O DIA 20" or str(message).upper() == "QUAL O CALENDARIO PARA O DIA 20?":
|
116 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
117 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -121,6 +131,8 @@ with gr.Blocks() as demo:
|
|
121 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
122 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
123 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
124 |
elif str(message).upper() == "DIA 20?" or str(message).upper() == "DIA 20":
|
125 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
126 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -130,6 +142,8 @@ with gr.Blocks() as demo:
|
|
130 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
131 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
132 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
133 |
elif str(message).upper() == "HORARIOS DO DIA 20" or str(message).upper() == "HORARIOS DO DIA 20" or str(message).upper() == "QUAIS OS HORARIOS DO DIA 20?":
|
134 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
135 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -139,6 +153,8 @@ with gr.Blocks() as demo:
|
|
139 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
140 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
141 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
142 |
elif str(message).upper() == "OQUE ESTÁ PLANEJADO PARA O DIA 20?" or str(message).upper() == "O QUE ESTÁ PLANEJADO PARA O DIA 20?":
|
143 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
144 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -148,6 +164,8 @@ with gr.Blocks() as demo:
|
|
148 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
149 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
150 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
151 |
elif str(message).upper() == "PLANOS PARA O DIA 20" or str(message).upper() == "PLANOS PARA O DIA 20" or str(message).upper() == "QUAIS OS PLANOS PARA O DIA 20?":
|
152 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
153 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
@@ -157,6 +175,8 @@ with gr.Blocks() as demo:
|
|
157 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
158 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
159 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
|
|
|
|
160 |
elif str(message).upper() == "PROGRAMACAO DIA 21" \
|
161 |
or str(message).upper() == "PROGRAMACAO DIA 21" \
|
162 |
or str(message).upper() == "PROGRAMAÇÃO DIA 21" or str(message).upper() == "QUAL A PROGRAMACAO DIA 21?" \
|
|
|
49 |
|
50 |
|
51 |
with gr.Blocks() as demo:
|
52 |
+
gpt = gr.Chatbot(label="GPT SUPEr", elem_id="chatbot").style(height=1200)
|
53 |
msg = gr.Textbox( show_label=False,
|
54 |
placeholder="Bem vindo ao ExpoSuper, Qual sua pergunta?",
|
55 |
).style(container=False)
|
|
|
62 |
realPath = str(os.path.dirname(os.path.realpath(__file__)))
|
63 |
|
64 |
if str(message).upper()=="OLA" or str(message).upper()=="OLÁ" or str(message).upper()=="OI":
|
65 |
+
vetor = vetor + [
|
66 |
+
((realPath + "\\images\\apresentacao.mp4",), "")]
|
67 |
else:
|
68 |
if str(message).upper() == "PROGRAMACAO DIA 20" \
|
69 |
or str(message).upper() == "PROGRAMACAO DIA 20" \
|
|
|
77 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
78 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
79 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
80 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
81 |
elif str(message).upper() == "AGENDA PARA O DIA 20" or str(message).upper() == "AGENDA PARA O DIA 20" or str(message).upper() == "QUAL A AGENDA DO DIA 20?":
|
82 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
83 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
87 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
88 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
89 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
90 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
91 |
+
|
92 |
elif str(message).upper() == "EVENTOS DO DIA 20" or str(message).upper() == "EVENTOS DO DIA 20" or str(message).upper() == "QUAIS OS EVENTOS DO DIA 20?":
|
93 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
94 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
98 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
99 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
100 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
101 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
102 |
+
|
103 |
elif str(message).upper() == "ATIVIDADES PROGRAMADAS PARA O DIA 20" or str(message).upper() == "ATIVIDADES PROGRAMADAS PARA O DIA 20" or str(message).upper() == "QUAIS AS ATIVIDADES PROGRAMADAS PARA O DIA 20?":
|
104 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
105 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
109 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
110 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
111 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
112 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
113 |
+
|
114 |
elif str(message).upper() == "CRONOGRAMA PARA O DIA 20" or str(message).upper() == "CRONOGRAMA PARA O DIA 20" or str(message).upper() == "QUAL O CRONOGRAMA PARA O DIA 20?":
|
115 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
116 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
120 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
121 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
122 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
123 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
124 |
+
|
125 |
elif str(message).upper() == "CALENDARIO PARA O DIA 20" or str(message).upper() == "CALENDARIO PARA O DIA 20" or str(message).upper() == "QUAL O CALENDARIO PARA O DIA 20?":
|
126 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
127 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
131 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
132 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
133 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
134 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
135 |
+
|
136 |
elif str(message).upper() == "DIA 20?" or str(message).upper() == "DIA 20":
|
137 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
138 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
142 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
143 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
144 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
145 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
146 |
+
|
147 |
elif str(message).upper() == "HORARIOS DO DIA 20" or str(message).upper() == "HORARIOS DO DIA 20" or str(message).upper() == "QUAIS OS HORARIOS DO DIA 20?":
|
148 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
149 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
153 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
154 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
155 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
156 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
157 |
+
|
158 |
elif str(message).upper() == "OQUE ESTÁ PLANEJADO PARA O DIA 20?" or str(message).upper() == "O QUE ESTÁ PLANEJADO PARA O DIA 20?":
|
159 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
160 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
164 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
165 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
166 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
167 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
168 |
+
|
169 |
elif str(message).upper() == "PLANOS PARA O DIA 20" or str(message).upper() == "PLANOS PARA O DIA 20" or str(message).upper() == "QUAIS OS PLANOS PARA O DIA 20?":
|
170 |
vetor = vetor + [((realPath + "\\images\\20-9-30.png",), "")]
|
171 |
vetor = vetor + [((realPath + "\\images\\20-10.png",), "")]
|
|
|
175 |
vetor = vetor + [((realPath + "\\images\\20-16.png",), "")]
|
176 |
vetor = vetor + [((realPath + "\\images\\20-16-1.png",), "")]
|
177 |
vetor = vetor + [((realPath + "\\images\\20-16-2.png",), "")]
|
178 |
+
vetor = vetor + [((realPath + "\\images\\palestrantes20.mp4",), "")]
|
179 |
+
|
180 |
elif str(message).upper() == "PROGRAMACAO DIA 21" \
|
181 |
or str(message).upper() == "PROGRAMACAO DIA 21" \
|
182 |
or str(message).upper() == "PROGRAMAÇÃO DIA 21" or str(message).upper() == "QUAL A PROGRAMACAO DIA 21?" \
|