caarleexx commited on
Commit
dbc5470
Β·
verified Β·
1 Parent(s): f66af6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +108 -143
app.py CHANGED
@@ -1,6 +1,6 @@
1
  # ╔════════════════════════════════════════════════════════════════════════════╗
2
- # β•‘ PIPELINE v33: ANALISADOR CONTEXTUAL + PLANEJADOR SΓ“CRATES β•‘
3
- # β•‘ 1ΒΊ: CATALOGA contexto β†’ 2ΒΊ: PLANEJA β†’ 3ΒΊ: EXECUTA β•‘
4
  # β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
5
 
6
  import os
@@ -22,10 +22,10 @@ if api_key:
22
  else:
23
  model_flash = model_pro = None
24
 
25
- ARQUIVO_CONTEXT = "contexto_v33.json"
26
- ARQUIVO_HISTORY = "history_v33.json"
27
 
28
- # ==================== 2. SISTEMA CONTEXTUAL (CORAÇÃO) ====================
29
  class AnalisadorContextual:
30
  def __init__(self):
31
  self.contexto = self.carregar_contexto()
@@ -37,141 +37,95 @@ class AnalisadorContextual:
37
  except:
38
  return {
39
  "classificacao": [],
40
- "fatos": [], # [tag, peso, input_ref, ultima_atualizacao]
41
  "objetivo_usuario": "",
42
- "dΓΊvida_central": "",
43
  "timestamp": ""
44
  }
45
 
46
  def salvar_contexto(self):
47
- with open(ARQUIVO_CONTEXT, "w", encoding="utf-8") as f:
48
- json.dump(self.contexto, f, ensure_ascii=False, indent=2)
 
 
49
 
50
  def analisar_input(self, input_atual, history):
51
- """CORAÇÃO: CATALOGA + ATUALIZA CONTEXTUAL"""
52
  if not model_pro:
53
  return self.contexto_fallback()
54
 
55
- history_resumo = "\n".join([f"πŸ‘€: {h[0][:100]}... πŸ€–: {h[1][:100]}..."
56
- for h in history[-4:]])[:400]
57
 
58
- prompt_analise = f"""ANALISE CONTEXTUAL v33 - CATALOGUE SEM RESPONDER
59
-
60
- INPUT ATUAL: {input_atual}
61
- HISTΓ“RICO RECENTE: {history_resumo}
62
 
63
- PREENCHA FORMULÁRIO JSON:
 
64
 
 
65
  {{
66
- "classificacao": ["anexo", "dΓΊvida", "crΓ­tica", "pesquisa"],
67
- "fatos": [
68
- ["gpu-l40s", 0.9, "input_001", "2025-12-05"],
69
- ["ltxv-video", 0.7, "input_002", "2025-12-04"]
70
- ],
71
- "objetivo_usuario": "Objetivo principal da conversa",
72
- "duvida_central": "Ponto especΓ­fico atual",
73
- "timestamp": "{datetime.now().isoformat()}"
74
- }}
75
-
76
- βœ… CATALOGUE FATOS com PESO (0.0-1.0)
77
- βœ… DECAIMENTO: fatos antigos perdem peso
78
- βœ… OBJETIVO: meta da conversa inteira
79
- βœ… DÚVIDA: foco imediato
80
-
81
- APENAS JSON VÁLIDO!"""
82
 
83
  try:
84
- resp = model_pro.generate_content(prompt_analise, temperature=0.1)
85
- raw = resp.text.strip()
86
- clean = re.sub(r'``````|\n\s*\n', '', raw)
87
- clean = re.sub(r'^.*?\[{2}', '[{', clean)
88
- clean = re.sub(r'\]{2}.*?$', '}]', clean)
89
-
90
- analise = json.loads(clean)
91
-
92
- # MERGE + DECAIMENTO
93
  self.contexto.update(analise)
94
- self.aplicar_decainento_fatos()
95
  self.contexto["timestamp"] = datetime.now().isoformat()
96
-
97
  self.salvar_contexto()
98
  return self.contexto
99
-
100
  except:
101
  return self.contexto_fallback()
102
 
103
  def contexto_fallback(self):
104
- return {
105
- "classificacao": ["dΓΊvida"],
106
- "fatos": [],
107
- "objetivo_usuario": "AnΓ‘lise tΓ©cnica/ML/legal",
108
- "duvida_central": "Processar input atual",
109
- "timestamp": datetime.now().isoformat()
110
- }
111
 
112
- def aplicar_decainento_fatos(self):
113
- """DECAIMENTO: peso *= 0.95 por dia sem menΓ§Γ£o"""
114
- agora = datetime.now().timestamp()
115
  novos_fatos = []
116
-
117
  for fato in self.contexto.get("fatos", []):
118
- tag, peso, input_ref, ultima = fato
119
- ultima_ts = datetime.fromisoformat(ultima).timestamp()
120
- dias = (agora - ultima_ts) / 86400 # dias desde ultima menΓ§Γ£o
121
- peso_decay = peso * (0.95 ** dias)
122
- if peso_decay > 0.1: # MantΓ©m fatos relevantes
123
- novos_fatos.append([tag, max(0.1, peso_decay), input_ref, self.contexto["timestamp"]])
124
-
125
- self.contexto["fatos"] = novos_fatos[:20] # Top 20 fatos
126
-
127
- # ==================== 3. PLANEJADOR SΓ“CRATES ====================
128
- def planejar_socrates(contexto, input_atual, history):
129
- """PLANEJA baseado em CONTEXTUAL + input"""
130
- if not model_pro:
131
- return fallback_plano()
132
-
133
- fatos_top = "\n".join([f"- {f[0]} ({f[1]:.2f})" for f in contexto.get("fatos", [])[:5]])
134
-
135
- prompt_socrates = f"""PLANEJADOR SΓ“CRATES v33
136
 
137
- CONTEXTO CATALOGADO:
138
- β€’ ClassificaΓ§Γ£o: {contexto.get('classificacao', [])}
139
- β€’ Fatos principais: {fatos_top}
140
- β€’ Objetivo: {contexto.get('objetivo_usuario', '')}
141
- β€’ DΓΊvida central: {contexto.get('duvida_central', '')}
142
 
143
- INPUT ATUAL: {input_atual}
144
-
145
- CRIE PLANO 3-5 agentes para RESOLVER PARADOXO MENON:
146
- [
147
- {{"nome": "Explorador", "missao": "Levante possibilidades", "modelo": "flash", "tipo_saida": "json"}},
148
- {{"nome": "Validador", "missao": "Teste cenΓ‘rios", "modelo": "pro", "tipo_saida": "json"}},
149
- {{"nome": "Sintetizador", "missao": "Resposta final clara", "modelo": "pro", "tipo_saida": "texto"}}
150
- ]
151
 
152
- APENAS JSON!"""
 
 
 
 
 
153
 
 
 
 
 
 
154
  try:
155
- resp = model_pro.generate_content(prompt_socrates)
156
  plano_raw = re.sub(r'``````', '', resp.text.strip())
157
  return json.loads(plano_raw)
158
  except:
159
  return fallback_plano()
160
 
161
- def fallback_plano():
162
- return [
163
- {"nome": "Analisador", "missao": "Analise contexto + input", "modelo": "flash", "tipo_saida": "json"},
164
- {"nome": "RespostaFinal", "missao": "Resposta clara e completa", "modelo": "pro", "tipo_saida": "texto"}
165
- ]
166
-
167
- # ==================== 4. EXECUTOR (REUTILIZADO) ====================
168
  def executar_agente(timeline, config):
169
- if not (model_flash or model_pro):
170
  return {"role": "system", "error": "Sem API"}, "ERRO", "Sem key"
171
 
172
  modelo = model_pro if config.get("modelo") == "pro" else model_flash
173
- contexto = json.dumps(timeline[-8:], ensure_ascii=False)
174
-
175
  prompt = f"CONTEXTO: {contexto}\nAGENTE: {config['nome']}\nMISSΓƒO: {config['missao']}"
176
 
177
  try:
@@ -180,42 +134,47 @@ def executar_agente(timeline, config):
180
  content = json.loads(re.sub(r'``````', '', out)) if config.get('tipo_saida') == 'json' else out
181
  return {"role": "assistant", "agent": config['nome'], "content": content}, "OK", out
182
  except:
183
- return {"role": "system", "error": "Falha"}, "ERRO", "Erro agente"
184
 
185
- # ==================== 5. ORQUESTRADOR v33 ====================
186
- analisador = AnalisadorContextual() # GLOBAL SINGLETON
 
 
 
 
 
187
 
188
- def orquestrador_v33(texto, arquivo, history, json_config):
189
  anexo = ler_anexo(arquivo)
190
- full_input = f"{texto}\n{anexo}".strip()
191
 
192
  if not full_input:
193
- yield history, {}, "Sem input."
194
  return
195
 
196
- history.append([full_input, "🧠 Catalogando contexto..."])
197
  timeline = [{"role": "user", "content": full_input}]
198
- logs = f"πŸš€ v33 SΓ“CRATES: {datetime.now().strftime('%H:%M:%S')}\n"
199
 
200
  yield history, timeline, logs
201
 
202
- # 1ΒΊ PASSO: ANALISADOR CONTEXTUAL (CORAÇÃO)
203
  contexto = analisador.analisar_input(full_input, history)
204
- logs += f"πŸ“Š Contexto: {len(contexto.get('fatos', []))} fatos | {contexto.get('classificacao', [])} | {contexto.get('objetivo_usuario', '')[:50]}...\n"
205
  timeline.append({"role": "system", "contexto": contexto})
206
 
207
- history[-1][1] = f"βœ… CatΓ‘logo: {len(contexto.get('fatos', []))} fatos catalogados"
208
  yield history, timeline, logs
209
 
210
- # 2ΒΊ PASSO: PLANEJADOR SΓ“CRATES
211
- plano = planejar_socrates(contexto, full_input, history)
212
  logs += f"🎯 Plano: {len(plano)} agentes\n"
213
  timeline.append({"role": "system", "plano": plano})
214
 
215
- history[-1][1] = f"🎯 Plano Sócrates: {len(plano)} etapas"
216
  yield history, timeline, logs
217
 
218
- # 3ΒΊ PASSO: EXECUTA PLANO
219
  for i, agente in enumerate(plano):
220
  history[-1][1] = f"[{i+1}/{len(plano)}] {agente['nome']}..."
221
  yield history, timeline, logs
@@ -224,57 +183,63 @@ def orquestrador_v33(texto, arquivo, history, json_config):
224
  timeline.append(res)
225
  logs += f" {status}\n"
226
 
227
- if agente.get('tipo_saida') == 'texto':
228
- history[-1][1] = str(res.get('content', ''))[:900]
229
  yield history, timeline, logs
230
 
231
- logs += "βœ… Pipeline SΓ³crates concluΓ­do"
232
  yield history, timeline, logs
233
 
234
- def ler_anexo(arquivo):
235
- if not arquivo: return ""
236
- try:
237
- with open(arquivo.name, "r", encoding="utf-8") as f:
238
- return f"\nπŸ“Ž {os.path.basename(arquivo.name)}:\n{f.read()}\n"
239
- except: return ""
240
-
241
- # ==================== 6. UI v33 ====================
242
- def ui_v33():
243
  css = "footer {display: none !important;} .contain {border: none !important;}"
244
 
245
- with gr.Blocks(title="πŸš€ PIPELINE v33 - SΓ“CRATES", css=css, theme=gr.themes.Soft()) as app:
246
- gr.Markdown("# 🧠 PIPELINE v33 - ANALISADOR CONTEXTUAL + SΓ“CRATES")
247
- gr.Markdown("*Cataloga β†’ Planeja β†’ Resolve paradoxo Menon*")
 
248
 
249
  with gr.Tabs():
250
  with gr.Tab("πŸ’¬ Pipeline"):
251
  chatbot = gr.Chatbot(height=600, show_copy_button=True, type="tuples")
252
 
253
  with gr.Row():
254
- txt_in = gr.Textbox(placeholder="Seu input...", lines=3, container=False)
255
  file_in = gr.UploadButton("πŸ“Ž", file_types=[".txt", ".py", ".json"])
256
  btn_send = gr.Button("▢️ Executar", variant="primary")
 
 
 
257
 
258
  with gr.Tab("πŸ” Debug"):
259
  out_dna = gr.JSON(label="Timeline")
260
  out_logs = gr.Textbox(label="Logs", lines=15)
261
 
262
  with gr.Tab("πŸ“Š Contexto"):
263
- contexto_display = gr.JSON(label="contexto_v33.json", value=analisador.contexto)
264
- gr.Button("Atualizar", variant="secondary")
 
 
265
 
266
- btn_send.click(orquestrador_v33,
267
- [txt_in, file_in, chatbot, gr.State({})],
268
- [chatbot, out_dna, out_logs]).then(
269
- lambda: gr.update(value=""), txt_in
270
- )
271
- txt_in.submit(btn_send.click_fn, [txt_in, file_in, chatbot, gr.State({})],
272
- [chatbot, out_dna, out_logs])
 
 
 
 
 
273
 
274
  return app
275
 
276
  if __name__ == "__main__":
277
- print("πŸš€ v33 SΓ“CRATES - ANALISADOR CONTEXTUAL ATIVO")
278
- print("πŸ“Š contexto_v33.json persiste fatos + pesos")
279
- app = ui_v33()
280
- app.launch(server_name="0.0.0.0", server_port=7860)
 
 
 
1
  # ╔════════════════════════════════════════════════════════════════════════════╗
2
+ # β•‘ PIPELINE v34: SΓ“CRATES CONTEXTUAL | HF SPACES 100% OK β•‘
3
+ # β•‘ FIX: sem gr.State() | sem click_fn | UI compatΓ­vel β•‘
4
  # β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
5
 
6
  import os
 
22
  else:
23
  model_flash = model_pro = None
24
 
25
+ ARQUIVO_CONTEXT = "contexto_v34.json"
26
+ ARQUIVO_HISTORY = "history_v34.json"
27
 
28
+ # ==================== 2. ANALISADOR CONTEXTUAL (CORAÇÃO) ====================
29
  class AnalisadorContextual:
30
  def __init__(self):
31
  self.contexto = self.carregar_contexto()
 
37
  except:
38
  return {
39
  "classificacao": [],
40
+ "fatos": [],
41
  "objetivo_usuario": "",
42
+ "duvida_central": "",
43
  "timestamp": ""
44
  }
45
 
46
  def salvar_contexto(self):
47
+ try:
48
+ with open(ARQUIVO_CONTEXT, "w", encoding="utf-8") as f:
49
+ json.dump(self.contexto, f, ensure_ascii=False, indent=2)
50
+ except: pass
51
 
52
  def analisar_input(self, input_atual, history):
 
53
  if not model_pro:
54
  return self.contexto_fallback()
55
 
56
+ history_resumo = "\n".join([f"πŸ‘€: {h[0][:80]}..." for h in history[-3:]])[:300]
 
57
 
58
+ prompt = f"""CATALOGUE SEM RESPONDER:
 
 
 
59
 
60
+ INPUT: {input_atual[:400]}
61
+ HISTΓ“RICO: {history_resumo}
62
 
63
+ JSON:
64
  {{
65
+ "classificacao": ["anexo","dΓΊvida","crΓ­tica","pesquisa"],
66
+ "fatos": [["gpu",0.9,"input1","2025-12-05"]],
67
+ "objetivo_usuario": "Meta da conversa",
68
+ "duvida_central": "Foco atual"
69
+ }}"""
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  try:
72
+ resp = model_pro.generate_content(prompt, temperature=0.1)
73
+ raw = re.sub(r'``````|\n\s*\n', '', resp.text.strip())
74
+ analise = json.loads(raw)
 
 
 
 
 
 
75
  self.contexto.update(analise)
76
+ self.aplicar_decainento()
77
  self.contexto["timestamp"] = datetime.now().isoformat()
 
78
  self.salvar_contexto()
79
  return self.contexto
 
80
  except:
81
  return self.contexto_fallback()
82
 
83
  def contexto_fallback(self):
84
+ return {"classificacao": ["dΓΊvida"], "fatos": [], "objetivo_usuario": "AnΓ‘lise geral", "duvida_central": input_atual}
 
 
 
 
 
 
85
 
86
+ def aplicar_decainento(self):
87
+ agora = time.time()
 
88
  novos_fatos = []
 
89
  for fato in self.contexto.get("fatos", []):
90
+ peso = fato[1] * 0.95
91
+ if peso > 0.1:
92
+ novos_fatos.append([fato[0], peso, fato[2], self.contexto["timestamp"]])
93
+ self.contexto["fatos"] = novos_fatos[:15]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
+ # ==================== 3. PLANEJADOR + EXECUTOR ====================
96
+ analisador = AnalisadorContextual()
 
 
 
97
 
98
+ def fallback_plano():
99
+ return [
100
+ {"nome": "Analisador", "missao": "Analise contexto + input", "modelo": "flash", "tipo_saida": "json"},
101
+ {"nome": "RespostaFinal", "missao": "Resposta clara completa", "modelo": "pro", "tipo_saida": "texto"}
102
+ ]
 
 
 
103
 
104
+ def planejar_socrates(contexto, input_atual):
105
+ if not model_pro: return fallback_plano()
106
+
107
+ fatos = "\n".join([f"- {f[0]}({f[1]:.1f})" for f in contexto.get("fatos", [])[:4]])
108
+ prompt = f"""CONTEXTO: {contexto}
109
+ INPUT: {input_atual[:200]}
110
 
111
+ PLANO JSON 3 agentes:
112
+ [{{"nome":"Explorador","missao":"Levante possibilidades","modelo":"flash","tipo_saida":"json"}},
113
+ {{"nome":"Validador","missao":"Teste cenΓ‘rios","modelo":"pro","tipo_saida":"json"}},
114
+ {{"nome":"Final","missao":"Resposta final","modelo":"pro","tipo_saida":"texto"}}]"""
115
+
116
  try:
117
+ resp = model_pro.generate_content(prompt)
118
  plano_raw = re.sub(r'``````', '', resp.text.strip())
119
  return json.loads(plano_raw)
120
  except:
121
  return fallback_plano()
122
 
 
 
 
 
 
 
 
123
  def executar_agente(timeline, config):
124
+ if not model_pro:
125
  return {"role": "system", "error": "Sem API"}, "ERRO", "Sem key"
126
 
127
  modelo = model_pro if config.get("modelo") == "pro" else model_flash
128
+ contexto = json.dumps(timeline[-6:], ensure_ascii=False)
 
129
  prompt = f"CONTEXTO: {contexto}\nAGENTE: {config['nome']}\nMISSΓƒO: {config['missao']}"
130
 
131
  try:
 
134
  content = json.loads(re.sub(r'``````', '', out)) if config.get('tipo_saida') == 'json' else out
135
  return {"role": "assistant", "agent": config['nome'], "content": content}, "OK", out
136
  except:
137
+ return {"role": "system", "error": "Erro"}, "ERRO", "Falha"
138
 
139
+ # ==================== 4. ORQUESTRADOR v34 ====================
140
+ def ler_anexo(arquivo):
141
+ if not arquivo: return ""
142
+ try:
143
+ with open(arquivo.name, "r", encoding="utf-8") as f:
144
+ return f"\nπŸ“Ž {os.path.basename(arquivo.name)}:\n{f.read()}\n"
145
+ except: return ""
146
 
147
+ def orquestrador_v34(texto, arquivo, history, json_config):
148
  anexo = ler_anexo(arquivo)
149
+ full_input = f"{texto}{anexo}".strip()
150
 
151
  if not full_input:
152
+ yield history, {}, "Sem input"
153
  return
154
 
155
+ history.append([full_input, "🧠 Catalogando..."])
156
  timeline = [{"role": "user", "content": full_input}]
157
+ logs = f"πŸš€ v34: {datetime.now().strftime('%H:%M:%S')}\n"
158
 
159
  yield history, timeline, logs
160
 
161
+ # 1. ANALISADOR CONTEXTUAL
162
  contexto = analisador.analisar_input(full_input, history)
163
+ logs += f"πŸ“Š {len(contexto.get('fatos',[]))} fatos | {contexto.get('classificacao')}\n"
164
  timeline.append({"role": "system", "contexto": contexto})
165
 
166
+ history[-1][1] = f"βœ… {len(contexto.get('fatos',[]))} fatos catalogados"
167
  yield history, timeline, logs
168
 
169
+ # 2. PLANEJADOR SΓ“CRATES
170
+ plano = planejar_socrates(contexto, full_input)
171
  logs += f"🎯 Plano: {len(plano)} agentes\n"
172
  timeline.append({"role": "system", "plano": plano})
173
 
174
+ history[-1][1] = f"🎯 {len(plano)} etapas planejadas"
175
  yield history, timeline, logs
176
 
177
+ # 3. EXECUTA
178
  for i, agente in enumerate(plano):
179
  history[-1][1] = f"[{i+1}/{len(plano)}] {agente['nome']}..."
180
  yield history, timeline, logs
 
183
  timeline.append(res)
184
  logs += f" {status}\n"
185
 
186
+ if agente.get('tipo_saida') == 'texto' and res.get('content'):
187
+ history[-1][1] = str(res['content'])[:900]
188
  yield history, timeline, logs
189
 
190
+ logs += "βœ… SΓ³crates concluΓ­do"
191
  yield history, timeline, logs
192
 
193
+ # ==================== 5. UI v34 (100% COMPATÍVEL) ====================
194
+ def ui_v34():
 
 
 
 
 
 
 
195
  css = "footer {display: none !important;} .contain {border: none !important;}"
196
 
197
+ config_init = "[]"
198
+
199
+ with gr.Blocks(title="πŸš€ PIPELINE v34 - SΓ“CRATES", css=css, theme=gr.themes.Soft()) as app:
200
+ gr.Markdown("# 🧠 PIPELINE v34 - ANALISADOR + SΓ“CRATES")
201
 
202
  with gr.Tabs():
203
  with gr.Tab("πŸ’¬ Pipeline"):
204
  chatbot = gr.Chatbot(height=600, show_copy_button=True, type="tuples")
205
 
206
  with gr.Row():
207
+ txt_in = gr.Textbox(placeholder="Digite input...", lines=3, container=False)
208
  file_in = gr.UploadButton("πŸ“Ž", file_types=[".txt", ".py", ".json"])
209
  btn_send = gr.Button("▢️ Executar", variant="primary")
210
+
211
+ file_status = gr.Markdown("")
212
+ file_in.upload(lambda x: f"πŸ“Ž {os.path.basename(x.name) if x else ''}", file_in, file_status)
213
 
214
  with gr.Tab("πŸ” Debug"):
215
  out_dna = gr.JSON(label="Timeline")
216
  out_logs = gr.Textbox(label="Logs", lines=15)
217
 
218
  with gr.Tab("πŸ“Š Contexto"):
219
+ contexto_json = gr.JSON(label="contexto_v34.json", value={})
220
+ gr.Button("Atualizar", variant="secondary").click(
221
+ lambda: analisador.contexto, outputs=contexto_json
222
+ )
223
 
224
+ # TRIGGERS CORRIGIDOS
225
+ btn_send.click(
226
+ orquestrador_v34,
227
+ inputs=[txt_in, file_in, chatbot, gr.Textbox(value="[]")],
228
+ outputs=[chatbot, out_dna, out_logs]
229
+ ).then(lambda: "", outputs=txt_in)
230
+
231
+ txt_in.submit(
232
+ orquestrador_v34,
233
+ inputs=[txt_in, file_in, chatbot, gr.Textbox(value="[]")],
234
+ outputs=[chatbot, out_dna, out_logs]
235
+ ).then(lambda: "", outputs=txt_in)
236
 
237
  return app
238
 
239
  if __name__ == "__main__":
240
+ print("πŸš€ v34 SΓ“CRATES - 100% HF SPACES OK")
241
+ print("βœ… Sem gr.State() | Sem click_fn")
242
+ print("πŸ“Š contexto_v34.json persiste memΓ³ria")
243
+
244
+ app = ui_v34()
245
+ app.launch(server_name="0.0.0.0", server_port=7860, share=False)