Jeremy Live
commited on
Commit
路
5758499
1
Parent(s):
02b14fa
Revert "API solved v4"
Browse filesThis reverts commit 02b14fa8a429470faf566db9cc79576103a4c9d3.
app.py
CHANGED
@@ -97,7 +97,11 @@ def create_application():
|
|
97 |
# Montar la API Flask en la aplicaci贸n Gradio
|
98 |
if os.getenv('SPACE_ID'):
|
99 |
import api
|
100 |
-
|
|
|
|
|
|
|
|
|
101 |
|
102 |
def user_message(user_input: str, chat_history: List[Dict[str, str]]) -> Tuple[str, List[Dict[str, str]]]:
|
103 |
"""Add user message to chat history (messages format) and clear input."""
|
|
|
97 |
# Montar la API Flask en la aplicaci贸n Gradio
|
98 |
if os.getenv('SPACE_ID'):
|
99 |
import api
|
100 |
+
demo = gr.mount_gradio_app(
|
101 |
+
api.app,
|
102 |
+
"/api", # Prefijo para los endpoints de la API
|
103 |
+
lambda: True # Autenticaci贸n deshabilitada
|
104 |
+
)
|
105 |
|
106 |
def user_message(user_input: str, chat_history: List[Dict[str, str]]) -> Tuple[str, List[Dict[str, str]]]:
|
107 |
"""Add user message to chat history (messages format) and clear input."""
|