mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
acq updates
This commit is contained in:
parent
55ad60585c
commit
db67f751c4
@ -46,7 +46,7 @@
|
||||
<body class="bg-white text-gray-900 text-md sm:text-lg">
|
||||
<div class="hidden w-full bg-yellow-200 text-center p-3">
|
||||
🎉 We are getting acquired by Hugging Face!
|
||||
<a class="font-semibold underline" href="/acquisition/">Read our announcement here.</a> 🤗
|
||||
<a class="font-semibold underline" href="/joining-huggingface/">Read our announcement here.</a> 🤗
|
||||
</div>
|
||||
<header class="container mx-auto p-4 flex justify-between items-center gap-4 flex-col sm:flex-row">
|
||||
<a href="/">
|
||||
|
@ -61,7 +61,7 @@
|
||||
<body class="bg-white text-gray-900 text-md sm:text-lg">
|
||||
<div class="hidden w-full bg-yellow-200 text-center p-3">
|
||||
🎉 We are getting acquired by Hugging Face!
|
||||
<a class="font-semibold underline" href="/acquisition/">Read our announcement here.</a> 🤗
|
||||
<a class="font-semibold underline" href="/joining-huggingface/">Read our announcement here.</a> 🤗
|
||||
</div>
|
||||
<header class="container mx-auto p-4 flex justify-between items-center gap-4 flex-col sm:flex-row">
|
||||
<a href="/">
|
||||
|
@ -28,7 +28,7 @@
|
||||
<body class="bg-white text-gray-900 text-md sm:text-lg">
|
||||
<div class="hidden w-full bg-yellow-200 text-center p-3">
|
||||
🎉 We are getting acquired by Hugging Face!
|
||||
<a class="font-semibold underline" href="/acquisition/">Read our announcement here.</a> 🤗
|
||||
<a class="font-semibold underline" href="/joining-huggingface/">Read our announcement here.</a> 🤗
|
||||
</div>
|
||||
<header class="container mx-auto p-4 flex justify-between items-center gap-4 flex-col sm:flex-row">
|
||||
<a href="/">
|
||||
|
@ -12,13 +12,14 @@
|
||||
<meta name="author" content="Gradio">
|
||||
<meta property="og:title" content="Gradio x Huggingface">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://gradio.app/acquisition">
|
||||
<meta property="og:url" content="https://gradio.app/joining-huggingface">
|
||||
<meta property="og:description" content="Gradio is joining Hugging Face! Read more about how we plan on working with Hugging Face to democratize access to the best machine learning applications.">
|
||||
<meta property="og:image" content="https://gradio.app/assets/img/acquisition_card.png">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:creator" content="@teamGradio">
|
||||
<meta name="twitter:title" content="Gradio x Huggingface">
|
||||
<meta name="twitter:description" content="Gradio is joining Hugging Face! Read more about how we plan on working with Hugging Face to democratize access to the best machine learning applications.">
|
||||
<meta name="twitter:image" content="/assets/img/acquisition_card.png">
|
||||
<meta name="twitter:image" content="https://gradio.app/assets/img/acquisition_card.png">
|
||||
|
||||
<link rel="icon" type="image/png" href="/assets/img/logo.png">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
@ -27,7 +28,7 @@
|
||||
<body class="bg-white text-gray-900 text-md sm:text-lg">
|
||||
<div class="w-full bg-yellow-200 text-center p-3">
|
||||
🎉 We are getting acquired by Hugging Face!
|
||||
<a class="font-semibold underline" href="/acquisition/">Read our announcement here.</a> 🤗
|
||||
<a class="font-semibold underline" href="/joining-huggingface/">Read our announcement here.</a> 🤗
|
||||
</div>
|
||||
<header class="container mx-auto p-4 flex justify-between items-center gap-4 flex-col sm:flex-row">
|
||||
<a href="/">
|
||||
@ -67,7 +68,7 @@
|
||||
<p class="italic">Gradio is joining Hugging Face! By acquiring Gradio, a machine learning startup, Hugging Face will be able to offer users, developers, and data scientists the tools needed to get to high level results and create better models and tools...</p>
|
||||
<p>Hmm, paragraphs about acquisitions like the one above are so common that an algorithm could write them. In fact, one did!! This first paragraph was written with the <a href="https://huggingface.co/spaces/abidlabs/The-Acquisition-Post-Generator">Acquisition Post Generator</a>, a machine learning demo on Hugging Face Spaces. You can run it yourself in your browser: provide the names of any two companies and you'll get a reasonable-sounding start to an article announcing their acquisition!</p>
|
||||
<p>The Acquisition Post Generator was built using our open-source Gradio library -- it is just one of our recent collaborations with Hugging Face. And I'm excited to announce that these collaborations are culminating in... 🥁 <strong>Hugging Face's acquisition of Gradio</strong> (so yes, that first paragraph might have been written by an algorithm but it's true!)</p>
|
||||
<img class="max-w-4xl mx-auto my-6" src="/assets/img/acquisition_screenshot.png">
|
||||
<img class="max-w-full mx-auto my-6" style="width: 54rem" src="/assets/img/acquisition_screenshot.png">
|
||||
<p>As one of the founders of Gradio, I couldn't be more excited about the next step in our journey. I still remember clearly how we started in 2019: as a PhD student at Stanford, I struggled to share a medical computer vision model with one of my collaborators, who was a doctor. I needed him to test my machine learning model, but he didn't know Python and couldn't easily run the model on his own images. I envisioned a library that could make it super simple for machine learning engineers to build and share demos of computer vision models, which in turn would lead to better feedback and more reliable models 🔁</p>
|
||||
<p>I recruited my talented housemates Ali Abdalla, Ali Abid, and Dawood Khan to release the first version of Gradio in 2019. We steadily expanded to cover more areas of machine learning including text, speech, and video. We found that it wasn't just researchers who needed to share machine learning models: interdisciplinary teams in industry, from startups to public companies, were building models and needed to debug them internally or showcase them externally. Gradio could help with both. Since we first released the library, more than 300,000 demos have been built with Gradio. We couldn't have done this without our community of contributors, our supportive investors, and the amazing Ahsen Khaliq who joined our company this year. </p>
|
||||
<p>Demos and GUIs built with Gradio give the power of machine learning to more and more people because they allow non-technical users to access, use, and give feedback on models. And our acquisition by Hugging Face is the next step in this ongoing journey of accessibility. Hugging Face has already radically democratized machine learning so that any software engineer can use state-of-the-art models with a few lines of code. By working together with Hugging Face, we're taking this even further so that machine learning is accessible to literally anyone with an internet connection and a browser. With Hugging Face, we are going to keep growing Gradio and make it the best way to share your machine learning model with anyone, anywhere 🚀</p>
|
69
website/upload_notebooks/run.py
Normal file
69
website/upload_notebooks/run.py
Normal file
@ -0,0 +1,69 @@
|
||||
import os
|
||||
import json
|
||||
from pydrive.auth import GoogleAuth
|
||||
from pydrive.drive import GoogleDrive
|
||||
|
||||
gauth = GoogleAuth()
|
||||
if os.path.exists("google_credentials.json"):
|
||||
gauth.LoadCredentialsFile("google_credentials.json")
|
||||
if gauth.credentials is None:
|
||||
gauth.LocalWebserverAuth()
|
||||
elif gauth.access_token_expired:
|
||||
gauth.Refresh()
|
||||
else:
|
||||
gauth.Authorize()
|
||||
gauth.SaveCredentialsFile("google_credentials.json")
|
||||
|
||||
with open("client_secrets.json") as client_secrets_file:
|
||||
client_secrets = client_secrets_file.read()
|
||||
with open("google_credentials.json") as google_credentials_file:
|
||||
google_credentials = google_credentials_file.read()
|
||||
|
||||
GRADIO_DEMO_DIR = "../../demo/"
|
||||
NOTEBOOK_TYPE = "application/vnd.google.colaboratory"
|
||||
GOOGLE_FOLDER_TYPE = "application/vnd.google-apps.folder"
|
||||
|
||||
def run():
|
||||
drive = GoogleDrive(gauth)
|
||||
|
||||
demo_links = {}
|
||||
with open("colab_template.ipynb") as notebook_template_file:
|
||||
notebook_template = notebook_template_file.read()
|
||||
file_list = drive.ListFile({'q': f"title='Demos' and mimeType='{GOOGLE_FOLDER_TYPE}' and 'root' in parents and trashed=false"}).GetList()
|
||||
if len(file_list) > 0:
|
||||
demo_folder = file_list[0].metadata["id"]
|
||||
else:
|
||||
demo_folder_file = drive.CreateFile({'title' : "Demos", 'mimeType' : GOOGLE_FOLDER_TYPE})
|
||||
demo_folder_file.Upload()
|
||||
demo_folder = demo_folder_file.metadata["id"]
|
||||
for demo_name in os.listdir(GRADIO_DEMO_DIR):
|
||||
notebook_title = demo_name + ".ipynb"
|
||||
print("--- " + demo_name + " ---")
|
||||
with open(os.path.join(GRADIO_DEMO_DIR, demo_name, "run.py")) as demo_file:
|
||||
demo_content = demo_file.read()
|
||||
demo_content = demo_content.replace('if __name__ == "__main__":\n iface.launch()', "iface.launch()")
|
||||
lines = demo_content.split("/n")
|
||||
demo_content = [line + "\n" if i != len(lines) - 1 else line for i, line in enumerate(lines)]
|
||||
notebook = json.loads(notebook_template)
|
||||
notebook["cells"][1]["source"] = demo_content
|
||||
file_list = drive.ListFile({'q': f"title='{notebook_title}' and mimeType='{NOTEBOOK_TYPE}' and 'root' in parents and trashed=false"}).GetList()
|
||||
if len(file_list) > 0:
|
||||
drive_file = file_list[0]
|
||||
else:
|
||||
drive_file = drive.CreateFile({
|
||||
'title': notebook_title,
|
||||
'mimeType': NOTEBOOK_TYPE,
|
||||
'parents': [{"id": demo_folder}]
|
||||
})
|
||||
drive_file.SetContentString(json.dumps(notebook))
|
||||
drive_file.Upload()
|
||||
drive_file.InsertPermission({
|
||||
'type': 'anyone',
|
||||
'value': 'anyone',
|
||||
'role': 'reader'})
|
||||
demo_links[demo_name] = drive_file['alternateLink']
|
||||
with open("../.env", "w") as env_file:
|
||||
env_file.write(f"COLAB_NOTEBOOK_LINKS='{json.dumps(demo_links)}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
Loading…
Reference in New Issue
Block a user