fffiloni commited on
Commit
de4a512
1 Parent(s): 0e633ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -0
app.py CHANGED
@@ -50,6 +50,41 @@ def inference(image, mode, best_max_flavors):
50
  else:
51
  return ci.interrogate_fast(image)
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  inputs = [
54
  gr.inputs.Image(type='pil'),
55
  gr.Radio(['best', 'classic', 'fast'], label='', value='best'),
50
  else:
51
  return ci.interrogate_fast(image)
52
 
53
+ title = """
54
+ <div style="text-align: center; max-width: 650px; margin: 0 auto;">
55
+ <div
56
+ style="
57
+ display: inline-flex;
58
+ align-items: center;
59
+ gap: 0.8rem;
60
+ font-size: 1.75rem;
61
+ "
62
+ >
63
+ <h1 style="font-weight: 900; margin-bottom: 7px;">
64
+ CLIP Interrogator 2.1
65
+ </h1>
66
+ </div>
67
+ <p style="margin-bottom: 10px; font-size: 94%">
68
+ Want to figure out what a good prompt might be to create new images like an existing one? The CLIP Interrogator is here to get you answers!
69
+ <br />This version is specialized for producing nice prompts for use with Stable Diffusion 2.0 using the ViT-H-14 OpenCLIP model!
70
+ </p>
71
+ </div>
72
+ """
73
+ article = """
74
+ <div style="text-align: center; max-width: 650px; margin: 0 auto;">
75
+
76
+ <p>
77
+ Server busy? You can also run on <a href="https://colab.research.google.com/github/pharmapsychotic/clip-interrogator/blob/open-clip/clip_interrogator.ipynb">Google Colab</a>
78
+ </p>
79
+ <p>
80
+ Has this been helpful to you? Follow Pharma on twitter
81
+ <a href="https://twitter.com/pharmapsychotic">@pharmapsychotic</a>
82
+ and check out more tools at his
83
+ <a href="https://pharmapsychotic.com/tools.html">Ai generative art tools list</a>
84
+ </p>
85
+ </div>
86
+ """
87
+
88
  inputs = [
89
  gr.inputs.Image(type='pil'),
90
  gr.Radio(['best', 'classic', 'fast'], label='', value='best'),