SoyAlekZen commited on
Commit
18145ae
·
verified ·
1 Parent(s): 59ace39

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -53,21 +53,20 @@ def set_thread_id(thr_id:str):
53
  thread_id = thr_id
54
 
55
  # Configuración de ChatInterface usando valores dinámicos
56
- with gr.Blocks() as demo:
57
-
58
- gr.ChatInterface(
59
  fn=chat_function,
60
  title=title,
61
  description=description,
62
  theme=theme,
63
  examples=examples,
 
64
 
65
  retry_btn=None,
66
  undo_btn=None,
67
  submit_btn="Enviar",
68
  stop_btn="Detener"
69
- ).queue()
70
- gr.Interface(fn=set_thread_id, inputs="textbox", title="id del hilo", outputs=None)
71
 
72
 
73
  if __name__ == "__main__":
 
53
  thread_id = thr_id
54
 
55
  # Configuración de ChatInterface usando valores dinámicos
56
+ demo=gr.ChatInterface(
 
 
57
  fn=chat_function,
58
  title=title,
59
  description=description,
60
  theme=theme,
61
  examples=examples,
62
+ get_session_details=set_thread_id,
63
 
64
  retry_btn=None,
65
  undo_btn=None,
66
  submit_btn="Enviar",
67
  stop_btn="Detener"
68
+ ).queue()
69
+
70
 
71
 
72
  if __name__ == "__main__":