kingabzpro commited on
Commit
29de13b
1 Parent(s): da9b2d7

Update app/app_savta.py

Browse files
Files changed (1) hide show
  1. app/app_savta.py +7 -1
app/app_savta.py CHANGED
@@ -5,6 +5,12 @@ import os
5
  from fastai.vision.all import *
6
  import gradio as gr
7
 
 
 
 
 
 
 
8
  ############## DVC ################################
9
 
10
  PROD_MODEL_PATH = "src/models"
@@ -73,7 +79,7 @@ def sepia(input_img):
73
 
74
 
75
  def main():
76
- iface = gr.Interface(sepia, gr.inputs.Image(shape=(640,480),type='numpy'), "image", title = title, flagging_options=["incorrect", "worst","ambiguous"], allow_flagging = "manual", description = description, article = article, examples = examples, theme ="peach",thumbnail=thumbnail)
77
 
78
  iface.launch(enable_queue=True)
79
  # enable_queue=True,auth=("admin", "pass1234")
 
5
  from fastai.vision.all import *
6
  import gradio as gr
7
 
8
+ ############### HF ###########################
9
+
10
+ HF_TOKEN = os.getenv('HF_TOKEN')
11
+
12
+ hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "savtadepth-flags")
13
+
14
  ############## DVC ################################
15
 
16
  PROD_MODEL_PATH = "src/models"
 
79
 
80
 
81
  def main():
82
+ iface = gr.Interface(sepia, gr.inputs.Image(shape=(640,480),type='numpy'), "image", title = title, flagging_options=["incorrect", "worst","ambiguous"], allow_flagging = "manual",flagging_callback=hf_writer, description = description, article = article, examples = examples, theme ="peach",thumbnail=thumbnail)
83
 
84
  iface.launch(enable_queue=True)
85
  # enable_queue=True,auth=("admin", "pass1234")