Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,6 @@ hf_api_key = os.environ["HF_API_KEY"]
|
|
| 9 |
|
| 10 |
get_completion = pipeline(os.environ["TASK"],model= os.environ["MODEL"])
|
| 11 |
|
| 12 |
-
def summarize(input):
|
| 13 |
-
output = get_completion(input)
|
| 14 |
-
return output[0]['generated_text']
|
| 15 |
-
|
| 16 |
def captioner(image):
|
| 17 |
result = get_completion(image)
|
| 18 |
return result[0]['generated_text']
|
|
@@ -27,4 +23,4 @@ demo = gr.Interface(fn=captioner,
|
|
| 27 |
examples=["bridge.jpg", "Sea.jpg", "Umbrella.jpg"])
|
| 28 |
|
| 29 |
|
| 30 |
-
demo.launch(
|
|
|
|
| 9 |
|
| 10 |
get_completion = pipeline(os.environ["TASK"],model= os.environ["MODEL"])
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
def captioner(image):
|
| 13 |
result = get_completion(image)
|
| 14 |
return result[0]['generated_text']
|
|
|
|
| 23 |
examples=["bridge.jpg", "Sea.jpg", "Umbrella.jpg"])
|
| 24 |
|
| 25 |
|
| 26 |
+
demo.launch()
|