GotThatData commited on
Commit
f4db98d
·
verified ·
1 Parent(s): 4905690

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +34 -0
app.py CHANGED
@@ -342,6 +342,40 @@ def generate_docking_result(target_id: str, compound_ids: List[str]) -> Tuple[st
342
  </div>
343
  <p style="color: #666; font-size: 11px; text-align: center; margin-top: 10px;">Binding Energy (kcal/mol) - Higher bars = stronger binding</p>
344
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  """
346
 
347
  # Generate blockchain receipt
 
342
  </div>
343
  <p style="color: #666; font-size: 11px; text-align: center; margin-top: 10px;">Binding Energy (kcal/mol) - Higher bars = stronger binding</p>
344
  </div>
345
+ """
346
+
347
+ # Add social sharing buttons
348
+ share_text = f"I just screened compounds against {target['name']} using BioPrime! Best hit: {results[0]['compound']} at {results[0]['energy']:.2f} kcal/mol. Try AI-powered drug discovery at bioprime.one"
349
+ share_url = "https://bioprime.one"
350
+
351
+ import urllib.parse
352
+ encoded_text = urllib.parse.quote(share_text)
353
+ encoded_url = urllib.parse.quote(share_url)
354
+
355
+ chart_html += f"""
356
+ <div style="background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); padding: 15px; border-radius: 12px; margin-top: 10px;">
357
+ <p style="color: #4ECDC4; font-size: 13px; text-align: center; margin-bottom: 12px; font-weight: 600;">Share Your Discovery</p>
358
+ <div style="display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;">
359
+ <a href="https://twitter.com/intent/tweet?text={encoded_text}&url={encoded_url}" target="_blank"
360
+ style="display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #1DA1F2; color: white; text-decoration: none; border-radius: 6px; font-size: 13px; font-weight: 500;">
361
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
362
+ Post on X
363
+ </a>
364
+ <a href="https://www.linkedin.com/sharing/share-offsite/?url={encoded_url}" target="_blank"
365
+ style="display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #0A66C2; color: white; text-decoration: none; border-radius: 6px; font-size: 13px; font-weight: 500;">
366
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
367
+ LinkedIn
368
+ </a>
369
+ <a href="https://www.facebook.com/sharer/sharer.php?u={encoded_url}&quote={encoded_text}" target="_blank"
370
+ style="display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #1877F2; color: white; text-decoration: none; border-radius: 6px; font-size: 13px; font-weight: 500;">
371
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
372
+ Facebook
373
+ </a>
374
+ </div>
375
+ <p style="color: #666; font-size: 11px; text-align: center; margin-top: 12px;">
376
+ Want real blockchain-verified results? <a href="https://bioprime.one" target="_blank" style="color: #4ECDC4;">Sign up at bioprime.one</a>
377
+ </p>
378
+ </div>
379
  """
380
 
381
  # Generate blockchain receipt