Spaces:
Running
on
Zero
Running
on
Zero
zeroGPU
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import re
|
| 3 |
import os
|
|
@@ -18,6 +19,7 @@ model = AutoModelForCausalLM.from_pretrained(model_path, use_auth_token=hf_token
|
|
| 18 |
|
| 19 |
clipi_client = Client("https://fffiloni-clip-interrogator-2.hf.space/")
|
| 20 |
|
|
|
|
| 21 |
def llama_gen_story(prompt):
|
| 22 |
|
| 23 |
instruction = """[INST] <<SYS>>\nYou are a storyteller. You'll be given an image description and some keyword about the image.
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
import re
|
| 4 |
import os
|
|
|
|
| 19 |
|
| 20 |
clipi_client = Client("https://fffiloni-clip-interrogator-2.hf.space/")
|
| 21 |
|
| 22 |
+
@spaces.GPU
|
| 23 |
def llama_gen_story(prompt):
|
| 24 |
|
| 25 |
instruction = """[INST] <<SYS>>\nYou are a storyteller. You'll be given an image description and some keyword about the image.
|