Omnibus commited on
Commit
268e717
1 Parent(s): 539820e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import torch
3
  from transformers import AutoFeatureExtractor, AutoModelForImageClassification, pipeline
4
  from numpy import exp
5
  import pandas as pd
6
-
7
  def softmax(vector):
8
  e = exp(vector)
9
  return e / e.sum()
@@ -91,7 +91,7 @@ def aiornot2(image):
91
  return gr.HTML.update(html_out),results
92
  def load_url(url):
93
  try:
94
- image = PIL.Image.open(url)
95
  mes = "Image Loaded"
96
  except Exception as e:
97
  image=None
 
3
  from transformers import AutoFeatureExtractor, AutoModelForImageClassification, pipeline
4
  from numpy import exp
5
  import pandas as pd
6
+ from PIL import Image
7
  def softmax(vector):
8
  e = exp(vector)
9
  return e / e.sum()
 
91
  return gr.HTML.update(html_out),results
92
  def load_url(url):
93
  try:
94
+ image = Image.open(url)
95
  mes = "Image Loaded"
96
  except Exception as e:
97
  image=None