Staticaliza commited on
Commit
96f2f76
1 Parent(s): 03694cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -18,6 +18,14 @@ DEFAULT_INPUT = "Describe in one paragraph."
18
  repo = AutoModel.from_pretrained("openbmb/MiniCPM-V-2_6", torch_dtype=torch.bfloat16, trust_remote_code=True)
19
  tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM-V-2_6", trust_remote_code=True)
20
 
 
 
 
 
 
 
 
 
21
  # Functions
22
  @spaces.GPU(duration=60)
23
  def generate(image, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7, top_p=0.8, top_k=100, repetition_penalty=1.05, max_tokens=512):
 
18
  repo = AutoModel.from_pretrained("openbmb/MiniCPM-V-2_6", torch_dtype=torch.bfloat16, trust_remote_code=True)
19
  tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM-V-2_6", trust_remote_code=True)
20
 
21
+ css = '''
22
+ .gradio-container{max-width: 560px !important}
23
+ h1{text-align:center}
24
+ footer {
25
+ visibility: hidden
26
+ }
27
+ '''
28
+
29
  # Functions
30
  @spaces.GPU(duration=60)
31
  def generate(image, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7, top_p=0.8, top_k=100, repetition_penalty=1.05, max_tokens=512):