Spaces:
Sleeping
Sleeping
Commit ·
ff767c9
1
Parent(s): fd08b12
Initial commit from Gitpod
Browse files
app.py
CHANGED
|
@@ -1,18 +1,16 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 4 |
-
|
| 5 |
-
os.environ["MPLCONFIGDIR"] = "/tmp/mplconfig"
|
| 6 |
|
| 7 |
os.makedirs("/tmp/huggingface", exist_ok=True)
|
| 8 |
os.makedirs("/tmp/mplconfig", exist_ok=True)
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
-
|
| 13 |
from fastapi import FastAPI, HTTPException
|
| 14 |
from pydantic import BaseModel
|
| 15 |
-
from transformers import pipeline
|
| 16 |
from fastapi.responses import StreamingResponse
|
| 17 |
import matplotlib.pyplot as plt
|
| 18 |
import requests
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 4 |
+
from transformers import pipeline
|
|
|
|
| 5 |
|
| 6 |
os.makedirs("/tmp/huggingface", exist_ok=True)
|
| 7 |
os.makedirs("/tmp/mplconfig", exist_ok=True)
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
+
|
| 12 |
from fastapi import FastAPI, HTTPException
|
| 13 |
from pydantic import BaseModel
|
|
|
|
| 14 |
from fastapi.responses import StreamingResponse
|
| 15 |
import matplotlib.pyplot as plt
|
| 16 |
import requests
|