chenluuli commited on
Commit
bc2e997
·
verified ·
1 Parent(s): 32a2e88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -1
app.py CHANGED
@@ -1,6 +1,25 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- from huggingface_hub import InferenceClient
4
  token = "" # todo 支持外部传入
5
 
6
  def initClient():
 
1
  import gradio as gr
2
+ # from huggingface_hub import InferenceClient
3
+ # from transformers import pipeline
4
+
5
+ # modelName = "chenluuli/test-text-vis"
6
+ # pipeline = pipeline(task="image-classification", model="chenluuli/test-text-vis")
7
+
8
+ # def predict(input_img):
9
+ # predictions = pipeline(input_img)
10
+ # return input_img, {p["label"]: p["score"] for p in predictions}
11
+
12
+ # gradio_app = gr.Interface(
13
+ # predict,
14
+ # inputs="text",
15
+ # outputs="text",
16
+ # title="demo",
17
+ # )
18
+
19
+ # if __name__ == "__main__":
20
+ # gradio_app.launch()
21
+
22
 
 
23
  token = "" # todo 支持外部传入
24
 
25
  def initClient():