FredOru commited on
Commit
d05dc9f
·
1 Parent(s): 479b357

added auth

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,6 +42,7 @@ def process(image_path):
42
  # frequency_penalty=0,
43
  # presence_penalty=0
44
  )
 
45
  return response.choices[0].message.content
46
 
47
  except Exception as e:
@@ -54,5 +55,5 @@ iface = gr.Interface(
54
  inputs=gr.Image(type="filepath"),
55
  outputs=gr.JSON(),
56
  )
57
-
58
- iface.launch()
 
42
  # frequency_penalty=0,
43
  # presence_penalty=0
44
  )
45
+ # print(response["usage"]["total_tokens"])
46
  return response.choices[0].message.content
47
 
48
  except Exception as e:
 
55
  inputs=gr.Image(type="filepath"),
56
  outputs=gr.JSON(),
57
  )
58
+ authorized_users = [("test", "édifice")]
59
+ iface.launch(auth=authorized_users)