DHEIVER commited on
Commit
7fc46e3
·
verified ·
1 Parent(s): 7f05f47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -10
app.py CHANGED
@@ -117,6 +117,13 @@ def create_disc_plot(percentuais):
117
 
118
  return fig
119
 
 
 
 
 
 
 
 
120
  def create_interface():
121
  with gr.Blocks(theme=gr.themes.Soft(
122
  primary_hue="blue",
@@ -134,27 +141,29 @@ def create_interface():
134
  - **I (Influência)**: Foco em relacionamentos e comunicação
135
  - **S (Estabilidade)**: Foco em cooperação e consistência
136
  - **C (Conformidade)**: Foco em qualidade e precisão
 
 
137
  """)
138
 
139
  with gr.Row():
140
- with gr.Column():
141
  radios = []
142
  for i, q in enumerate(DISC_QUESTIONS):
143
- with gr.Box():
144
- radio = gr.Radio(
145
- choices=[f"{p} - {d}" for p, d in q['opcoes']],
146
- label=f"{i+1}. {q['pergunta']}",
147
- container=True
148
- )
149
- radios.append(radio)
 
150
 
151
  with gr.Row():
152
  analyze_btn = gr.Button("📊 Analisar Perfil", size="lg", variant="primary")
153
  reset_btn = gr.Button("🔄 Novo Teste", size="lg", variant="secondary")
154
 
155
  with gr.Row():
156
- with gr.Column():
157
- plot = gr.Plot(label="Gráfico de Perfil DISC")
158
 
159
  with gr.Row():
160
  output = gr.Markdown()
 
117
 
118
  return fig
119
 
120
+ import gradio as gr
121
+ import plotly.graph_objects as go
122
+ from sentence_transformers import SentenceTransformer
123
+ import numpy as np
124
+
125
+ # [Previous imports and constants remain the same]
126
+
127
  def create_interface():
128
  with gr.Blocks(theme=gr.themes.Soft(
129
  primary_hue="blue",
 
141
  - **I (Influência)**: Foco em relacionamentos e comunicação
142
  - **S (Estabilidade)**: Foco em cooperação e consistência
143
  - **C (Conformidade)**: Foco em qualidade e precisão
144
+
145
+ ---
146
  """)
147
 
148
  with gr.Row():
149
+ with gr.Column(scale=2):
150
  radios = []
151
  for i, q in enumerate(DISC_QUESTIONS):
152
+ radio = gr.Radio(
153
+ choices=[f"{p} - {d}" for p, d in q['opcoes']],
154
+ label=f"{i+1}. {q['pergunta']}",
155
+ container=True,
156
+ scale=2
157
+ )
158
+ gr.Markdown("---") # Separator between questions
159
+ radios.append(radio)
160
 
161
  with gr.Row():
162
  analyze_btn = gr.Button("📊 Analisar Perfil", size="lg", variant="primary")
163
  reset_btn = gr.Button("🔄 Novo Teste", size="lg", variant="secondary")
164
 
165
  with gr.Row():
166
+ plot = gr.Plot(label="Gráfico de Perfil DISC")
 
167
 
168
  with gr.Row():
169
  output = gr.Markdown()