Jeremy Live
commited on
Commit
路
02b14fa
1
Parent(s):
efc0b49
API solved v4
Browse files
app.py
CHANGED
@@ -97,11 +97,7 @@ def create_application():
|
|
97 |
# Montar la API Flask en la aplicaci贸n Gradio
|
98 |
if os.getenv('SPACE_ID'):
|
99 |
import api
|
100 |
-
|
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."""
|
|
|
97 |
# Montar la API Flask en la aplicaci贸n Gradio
|
98 |
if os.getenv('SPACE_ID'):
|
99 |
import api
|
100 |
+
api.app = gr.mount_gradio_app(api.app, demo, path="/")
|
|
|
|
|
|
|
|
|
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."""
|