Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,7 @@ import json
|
|
37 |
from dotenv import load_dotenv
|
38 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
39 |
from collections import Counter
|
|
|
40 |
|
41 |
# Load environment variables from .env file
|
42 |
load_dotenv()
|
@@ -273,7 +274,7 @@ def fDistancePlot(text2Party,plotN=15):
|
|
273 |
buf = BytesIO()
|
274 |
plt.savefig(buf)
|
275 |
buf.seek(0)
|
276 |
-
img1 = Image.open(buf)
|
277 |
plt.clf()
|
278 |
return img1
|
279 |
|
|
|
37 |
from dotenv import load_dotenv
|
38 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
39 |
from collections import Counter
|
40 |
+
import numpy as np
|
41 |
|
42 |
# Load environment variables from .env file
|
43 |
load_dotenv()
|
|
|
274 |
buf = BytesIO()
|
275 |
plt.savefig(buf)
|
276 |
buf.seek(0)
|
277 |
+
img1 = np.array(Image.open(buf))
|
278 |
plt.clf()
|
279 |
return img1
|
280 |
|