brurei commited on
Commit
f2bd1c6
·
1 Parent(s): c0ae7f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +73 -14
app.py CHANGED
@@ -13,8 +13,13 @@ p = pipeline("automatic-speech-recognition")
13
  os.environ["OPENAI_API_KEY"] = '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'
14
 
15
  css = """
 
 
 
 
16
  #component-2 {position: absolute; bottom: 0; width: 100%;
17
  }
 
18
  div.float.svelte-1frtwj3 {
19
  position: absolute;
20
  opacity: 0;
@@ -25,11 +30,8 @@ div.float.svelte-1frtwj3 {
25
  height: 100%;
26
  max-height: 100%;
27
  overflow-y: auto;
28
- }
29
- .bot.svelte-6roggh.svelte-6roggh, .pending.svelte-6roggh.svelte-6roggh {
30
- border-color: #759ce9;
31
- background: #ffffff;
32
  }
 
33
  div.svelte-1frtwj3 {
34
  display: inline-flex;
35
  align-items: center;
@@ -47,24 +49,80 @@ div.svelte-1frtwj3 {
47
  width: 100%;
48
  line-height: var(--line-sm);
49
  }
50
- div.svelte-awbtu4 {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  display: flex;
52
  flex-direction: inherit;
53
  flex-wrap: wrap;
54
  gap: var(--form-gap-width);
55
  box-shadow: var(--block-shadow);
56
- border: var(--block-border-width) solid var(--border-color-primary);
57
  border-radius: var(--radius-lg);
58
- background: var(--border-color-primary);
59
  overflow: hidden;
60
  position: fixed;
61
  bottom: 0;
62
  margin-left: -16px;
63
  }
64
- img.svelte-ms5bsk {
65
- width: var(--size-full);
66
- height: 90px;
67
- object-fit: contain;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
  .app.svelte-ac4rv4.svelte-ac4rv4 {
70
  max-width: none;
@@ -72,14 +130,15 @@ img.svelte-ms5bsk {
72
  }
73
  .app.svelte-ac4rv4.svelte-ac4rv4{max-width:none}
74
  .wrap.svelte-1o68geq.svelte-1o68geq {max-height: none}
 
75
  .block.svelte-mppz8v {
76
  position: relative;
77
  margin: 0;
78
  box-shadow: var(--block-shadow);
79
  border-width: var(--block-border-width);
80
- border-color: #dbeafe;
81
  border-radius: var(--block-radius);
82
- background: #dbeafe;
83
  width: 100%;
84
  line-height: var(--line-sm);
85
  }
@@ -124,7 +183,7 @@ def chatbot(input_text):
124
 
125
  with gr.Blocks(css=css, elem_classes=".app.svelte-ac4rv4.svelte-ac4rv4") as demo:
126
  realPath = str(os.path.dirname(os.path.realpath(__file__)))
127
- img1 = gr.Image("images/imagem teste.png")
128
  gpt = gr.Chatbot(label="Converse com GPT Super da CD2",elem_classes=".wrap.svelte-1o68geq.svelte-1o68geq", elem_id="chatbot").style(container=True)
129
  msg = gr.Textbox(elem_id="div.svelte-awbtu4",elem_classes="div.svelte-awbtu4", show_label=False,
130
  placeholder="Bem vindo ao ExpoSuper, Qual sua pergunta?",
 
13
  os.environ["OPENAI_API_KEY"] = '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'
14
 
15
  css = """
16
+ .gradio-container {
17
+ background-color: #ffffff;
18
+ }
19
+
20
  #component-2 {position: absolute; bottom: 0; width: 100%;
21
  }
22
+
23
  div.float.svelte-1frtwj3 {
24
  position: absolute;
25
  opacity: 0;
 
30
  height: 100%;
31
  max-height: 100%;
32
  overflow-y: auto;
 
 
 
 
33
  }
34
+
35
  div.svelte-1frtwj3 {
36
  display: inline-flex;
37
  align-items: center;
 
49
  width: 100%;
50
  line-height: var(--line-sm);
51
  }
52
+
53
+ div.bot.svelte-6roggh.svelte-6roggh {
54
+ background: #199FDA;
55
+ }
56
+
57
+ div.bot.svelte-17nzccn.svelte-17nzccn {
58
+ background: #199FDA;
59
+ }
60
+
61
+ div.user.svelte-6roggh.svelte-6roggh {
62
+ background: #0D1233;
63
+ }
64
+
65
+ div.user.svelte-17nzccn.svelte-17nzccn {
66
+ background: #0D1233;
67
+ }
68
+
69
+ div.textBoxBot {
70
  display: flex;
71
  flex-direction: inherit;
72
  flex-wrap: wrap;
73
  gap: var(--form-gap-width);
74
  box-shadow: var(--block-shadow);
75
+ border: var(--block-border-width) solid #0D1233;
76
  border-radius: var(--radius-lg);
77
+ background: #ffffff;
78
  overflow: hidden;
79
  position: fixed;
80
  bottom: 0;
81
  margin-left: -16px;
82
  }
83
+
84
+ .textarea.svelte-1pie7s6.svelte-1pie7s6 {
85
+ display: flex;
86
+ flex-direction: inherit;
87
+ flex-wrap: wrap;
88
+ gap: var(--form-gap-width);
89
+ box-shadow: var(--block-shadow);
90
+ border: var(--block-border-width) solid #0D1233;
91
+ border-radius: var(--radius-lg);
92
+ background: #ffffff;
93
+ overflow: hidden;
94
+ position: fixed;
95
+ bottom: 0;
96
+ margin-left: -16px;
97
+ }
98
+
99
+ .svelte-1pie7s6.svelte-1pie7s6 {
100
+ display: flex;
101
+ flex-direction: inherit;
102
+ flex-wrap: wrap;
103
+ gap: var(--form-gap-width);
104
+ box-shadow: var(--block-shadow);
105
+ border: 5px solid #0D1233;
106
+ border-radius: var(--radius-lg);
107
+ border-color: #0D1233;
108
+ background: #ffffff;
109
+ color: #0D1233;
110
+ font-size: 16px;
111
+ overflow: hidden;
112
+ position: fixed;
113
+ bottom: 20px; /* Ajuste a distância vertical do rodapé */
114
+ margin-left: -5px;
115
+ max-height: 80vh; /* Ajuste a altura máxima da div */
116
+ max-width: 78%; /* Ajuste a largura máxima da div */
117
+ }
118
+
119
+
120
+ .img.svelte-ms5bsk {
121
+ width: 100%;
122
+ height: 100%;
123
+ background-color: #ffffff;
124
+ border: 0px;
125
+ border-width: 0px;
126
  }
127
  .app.svelte-ac4rv4.svelte-ac4rv4 {
128
  max-width: none;
 
130
  }
131
  .app.svelte-ac4rv4.svelte-ac4rv4{max-width:none}
132
  .wrap.svelte-1o68geq.svelte-1o68geq {max-height: none}
133
+
134
  .block.svelte-mppz8v {
135
  position: relative;
136
  margin: 0;
137
  box-shadow: var(--block-shadow);
138
  border-width: var(--block-border-width);
139
+ border-color: #ffffff;
140
  border-radius: var(--block-radius);
141
+ background: #ffffff;
142
  width: 100%;
143
  line-height: var(--line-sm);
144
  }
 
183
 
184
  with gr.Blocks(css=css, elem_classes=".app.svelte-ac4rv4.svelte-ac4rv4") as demo:
185
  realPath = str(os.path.dirname(os.path.realpath(__file__)))
186
+ img1 = gr.Image("images/Cabeçalho_GPT_Exposuper.png", elem_classes=".img.svelte-ms5bsk", elem_id="img.svelte-ms5bsk").style(container=False)
187
  gpt = gr.Chatbot(label="Converse com GPT Super da CD2",elem_classes=".wrap.svelte-1o68geq.svelte-1o68geq", elem_id="chatbot").style(container=True)
188
  msg = gr.Textbox(elem_id="div.svelte-awbtu4",elem_classes="div.svelte-awbtu4", show_label=False,
189
  placeholder="Bem vindo ao ExpoSuper, Qual sua pergunta?",