rbiswasfc commited on
Commit
00ebeef
1 Parent(s): 43191f7
Files changed (2) hide show
  1. app.py +6 -2
  2. requirements.txt +3 -1
app.py CHANGED
@@ -7,6 +7,7 @@ from typing import ClassVar
7
  import lancedb
8
  import srsly
9
  from fasthtml.common import * # noqa
 
10
  from huggingface_hub import snapshot_download
11
  from lancedb.embeddings.base import TextEmbeddingFunction
12
  from lancedb.embeddings.registry import register
@@ -271,6 +272,9 @@ async def get():
271
 
272
 
273
  if __name__ == "__main__":
274
- import uvicorn
275
 
276
- uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 7860)))
 
 
 
 
7
  import lancedb
8
  import srsly
9
  from fasthtml.common import * # noqa
10
+ from fasthtml_hf import setup_hf_backup
11
  from huggingface_hub import snapshot_download
12
  from lancedb.embeddings.base import TextEmbeddingFunction
13
  from lancedb.embeddings.registry import register
 
272
 
273
 
274
  if __name__ == "__main__":
275
+ # import uvicorn
276
 
277
+ # uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 7860)))
278
+
279
+ setup_hf_backup(app)
280
+ run_uv()
requirements.txt CHANGED
@@ -1,4 +1,6 @@
1
- python-fasthtml
 
 
2
  uvicorn>=0.29
3
  lancedb
4
  srsly
 
1
+ fasthtml-hf>=0.1.1
2
+ python-fasthtml>=0.0.8
3
+ huggingface-hub>=0.20.0
4
  uvicorn>=0.29
5
  lancedb
6
  srsly