Spaces:
Sleeping
Sleeping
Update app.py
Browse files2 unmodified lines34567841 unmodified lines505152532 unmodified linesfrom pydantic import BaseModelfrom transformers import AutoTokenizer, AutoModelForCausalLMimport torchapp = FastAPI()41 unmodified linesreturn JSONResponse({"reply": reply})except Exception as e:return JSONResponse({"error": str(e)})2 unmodified lines345678941 unmodified lines51525354555657582 unmodified linesfrom pydantic import BaseModelfrom transformers import AutoTokenizer, AutoModelForCausalLMimport torchimport uvicornapp = FastAPI()41 unmodified linesreturn JSONResponse({"reply": reply})except Exception as e:return JSONResponse({"error": str(e)})# 👇 ВАЖНЫЙ БЛОКif __name__ == "__main__":uvicorn.run(app, host="0.0.0.0", port=7860)
app.py+6-1