Cyantist8208 commited on
Commit
a16bd28
·
1 Parent(s): 55a8a56

torch give me my memory

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,7 +3,9 @@ app.py – Tiny-RAG (Gradio playground) + REST API (/ingest, /query)
3
  """
4
 
5
  # ---------- 1. imports & global helpers -------------
6
- import os, math, torch, uvicorn, gradio as gr
 
 
7
  from fastapi import FastAPI, HTTPException
8
  from pydantic import BaseModel
9
  from transformers import (
 
3
  """
4
 
5
  # ---------- 1. imports & global helpers -------------
6
+ import os
7
+ os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
8
+ import math, torch, uvicorn, gradio as gr
9
  from fastapi import FastAPI, HTTPException
10
  from pydantic import BaseModel
11
  from transformers import (