apirrone commited on
Commit
3f413a3
·
1 Parent(s): c47d644

run from main

Browse files
src/reachy_mini_conversation_app/console.py CHANGED
@@ -28,7 +28,7 @@ from reachy_mini_conversation_app.headless_personality_ui import mount_personali
28
 
29
  try:
30
  # FastAPI is provided by the Reachy Mini Apps runtime
31
- from fastapi import FastAPI
32
  from pydantic import BaseModel
33
  from fastapi.responses import FileResponse, JSONResponse
34
  from starlette.staticfiles import StaticFiles
@@ -186,6 +186,11 @@ class LocalStream:
186
  def _root() -> FileResponse: # type: ignore[no-redef]
187
  return FileResponse(str(index_file))
188
 
 
 
 
 
 
189
  # GET /status -> whether key is set
190
  @self._settings_app.get("/status") # type: ignore[union-attr]
191
  def _status() -> JSONResponse: # type: ignore[no-redef]
 
28
 
29
  try:
30
  # FastAPI is provided by the Reachy Mini Apps runtime
31
+ from fastapi import FastAPI, Response
32
  from pydantic import BaseModel
33
  from fastapi.responses import FileResponse, JSONResponse
34
  from starlette.staticfiles import StaticFiles
 
186
  def _root() -> FileResponse: # type: ignore[no-redef]
187
  return FileResponse(str(index_file))
188
 
189
+ # GET /favicon.ico -> optional, avoid noisy 404s on some browsers
190
+ @self._settings_app.get("/favicon.ico") # type: ignore[union-attr]
191
+ def _favicon() -> Response: # type: ignore[no-redef]
192
+ return Response(status_code=204)
193
+
194
  # GET /status -> whether key is set
195
  @self._settings_app.get("/status") # type: ignore[union-attr]
196
  def _status() -> JSONResponse: # type: ignore[no-redef]
src/reachy_mini_conversation_app/main.py CHANGED
@@ -210,7 +210,7 @@ class ReachyMiniConversationApp(ReachyMiniApp): # type: ignore[misc]
210
  asyncio.set_event_loop(loop)
211
 
212
  args, _ = parse_args()
213
- # args.gradio = True # Force gradio for Reachy Mini App integration
214
  instance_path = self._get_instance_path().parent
215
  run(
216
  args,
@@ -222,9 +222,8 @@ class ReachyMiniConversationApp(ReachyMiniApp): # type: ignore[misc]
222
 
223
 
224
  if __name__ == "__main__":
225
- # app = ReachyMiniConversationApp()
226
- # try:
227
- # app.wrapped_run()
228
- # except KeyboardInterrupt:
229
- # app.stop()
230
- main()
 
210
  asyncio.set_event_loop(loop)
211
 
212
  args, _ = parse_args()
213
+ args.head_tracker = "mediapipe"
214
  instance_path = self._get_instance_path().parent
215
  run(
216
  args,
 
222
 
223
 
224
  if __name__ == "__main__":
225
+ app = ReachyMiniConversationApp()
226
+ try:
227
+ app.wrapped_run()
228
+ except KeyboardInterrupt:
229
+ app.stop()