Embraced by Hugging Face: the Inside Story of Our Startup’s Acquisition In late 2021, our team of five engineers, scattered around the globe, signed the papers to shut down our startup, Gradio. For many founders, this would have been a moment of sadness or even bitter https://t.co/Cpw7IxFY3I

14 min read Original article ↗

Embraced by Hugging Face: the Inside Story of Our Startup’s Acquisition In late 2021, our team of five engineers, scattered around the globe, signed the papers to shut down our startup, Gradio. For many founders, this would have been a moment of sadness or even bitter reflection. But we were celebrating. We were getting acquired by Hugging Face! We had been working very hard towards this acquisition, but for weeks, the acquisition had been blocked by a single investor. The more we pressed him, the more he buckled down, refusing to sign off on the acquisition. Until, unexpectedly, the investor conceded, allowing us to join Hugging Face. For the first time since our acquisition, I’m writing down the story in detail, hoping that it may shed some light into the obscure world of startup acquisitions and what decisions founders can make to improve their odds for a successful acquisition. To understand how we got acquired by Hugging Face, you need to know why we started Gradio. An Idea from the Heart Two years before the acquisition, in early 2019, I was working on a research project at Stanford. It was the third year of my PhD, and my labmates and I had trained a machine learning model that could predict patient biomarkers (such as whether patients had certain diseases or an implanted pacemaker) from an ultrasound image of their heart — as well as a cardiologist. Naturally, cardiologists were skeptical, so we wanted to show our model to them in a way that would squash any skepticism. I built a “web interface” for the model: a GUI that cardiologists could use to upload an ultrasound image and get a prediction. Users could also draw brush strokes on the image, allowing them to modify the original image and see how the model’s prediction would change. After a couple of days, we were ready. Our cardiologist collaborator came to the lab and uploaded an ultrasound. The model accurately classified the image of the heart as containing a pacemaker. The cardiologist drew a rough gray brush stroke on the ultrasound to “hide” the pacemaker. And the model’s predictions changed in real time! The cardiologist was impressed, especially as the model kept spitting out correct predictions as he stress-tested the model. I distinctly remember my own sigh of relief — it was one thing to see a good test accuracy, but it was a whole separate thing to see the model hold up in real-world testing. After the collaborator left, I thought: this is how all machine learning models should be tested. Not just by evaluating them on static test sets, but by letting domain experts or end users actually test the model. Of course, this wasn’t practical since we couldn’t expect most machine learning engineers to build a whole web demo for their machine learning models. Or could we? Most machine learning engineers only knew Python, not web development. But what if we could make it possible to build machine learning web demos entirely in Python? Gradio, Inc. I spent the next few weeks doing two things: (1) building a Python library that could replace the need to know CSS, JavaScript and web hosting in order to build a web demo, and (2) convincing my three roommates, @AliAbid41388524,

@si3luwa

, and

@dawoodnyc

, to join me. At the time, they were working as software engineers in the Bay Area for different big tech companies, so luckily, they didn't need much convincing to quit and work on something more exciting. Together, we created the v1 of Gradio and started sharing it on Twitter and with our friends. We also published a conference paper and I began giving talks about Gradio to various classes at Stanford. After one such talk, a graduate student approached me and said that he worked at a venture capital firm near Stanford called

@PearVC

. He asked: would I be interested in raising some money to commercialize Gradio? With his introduction, we raised a pre-seed round led by Pear Ventures and, soon after that, a few million dollars in seed funding from a “party round” of about 15 investors (not a good idea as we’d learn later) and got to work. Product-User Fit, not Product-Market Fit Users loved Gradio — Segment analytics baked into our library made that clear — but there was a slight problem: we weren't making money After raising our seed round in December 2019, investors started asking us for quarterly updates, and we realized that we had to make a decision — either pivot to a more typical SaaS business, or double down on open-source and grow usage. I wish we had the conviction to focus on open-source and keep growing our community, but our knee-jerk reaction was to pivot. For most of 2020, we tried various SaaS-y ideas, but none resonated with customers (honestly, none of the ideas stuck with us as founders either). After a year of pivoting, in early 2021, the four of us decided to return to the heart of our mission: to build open-source ML tools for developers, not SaaS products. We looked back at the GitHub repo for Gradio and found that Gradio had been starred hundreds of times, even as an unmaintained project. We decided to pivot back to growing Gradio and figure out the fiscal consequences later. Around that time, we received a DM from

@_akhaliq

(AK), who was (and remains) a Twitter influencer in machine learning. He told us that he had tried Gradio, loved it, and wanted to help grow it. With renewed enthusiasm, we gave ourselves until the end of 2021 to figure out if Gradio could be a viable company and got back to open-source. That year, through a combination of releasing new features to support more machine learning modalities and with outreach led by AK, we grew 10x in users. We started to see machine learning labs release Gradio demos organically along with their code and papers. We found some level of product-user fit and realized we should have trusted our intuitions earlier. We experimented with several commercial products based on Gradio, including GradioHub, a platform for hosting machine learning apps, but we continued to struggle with generating recurring revenue. Then, in the summer of 2021, we received an inbound email from a Formspree form we had embedded on our website. A name that seemed familiar: Julien Chaumond. The Casual Acquisition

@julien_c

is the CTO of Hugging Face, which in 2021, was well-known among machine learning engineers for releasing the transformers Python library, as well as a demo to showcase the library called “Write with Transformers.” We had spoken to Hugging Face's CEO,

@ClementDelangue

, in a sales call the year before when we had pivoted to SaaS products. Was this a late response to our sales call? It turned out that Julien wasn’t aware of that call at all. Instead, GradioHub (our commercial experiment) had piqued his interest and he wanted to discuss a possible integration between Gradio and Hugging Face. The idea, which Gradio and Hugging Face engineers collaborated on, was ultimately released later that year as Hugging Face Spaces: a place to host your machine learning demos for free, easily building on machine learning models and datasets. We continued to collaborate on Spaces and after a few months, we had a conversation with Julien to assess our progress. The launch of Spaces had proven transformative, both for Gradio and Hugging Face. Spaces exposed many more users to Gradio, and it turns out that people love sharing and playing with demos, which brought a lot of traffic to Hugging Face. One early demo Space, called AnimeGAN, went viral on Twitter and Tiktok as it allowed users to create rotoscoped versions of their profile pictures instantly. For example, here's an image of

@ElonMusk

transformed with the AnimeGAN demo: Towards the end of our conversation, Julien asked casually: would we be interested in continuing to work together by joining Hugging Face? I responded that I needed to discuss it with the whole team. But as a team, we reached our decision fairly quickly — we had, in fact, envisioned getting acquired by Hugging Face throughout the collaboration. Hugging Face was the clear leader in open-source machine learning, and Spaces had already proven how much faster we could grow Gradio by working together. We asked for details, and Julien responded immediately over a shared Slack channel with an acquisition offer. It was at that time that I saw firsthand some of Hugging Face’s values: act quickly, communicate asynchronously, and share transparently. At the same time, we reached out to friends who had their startups acquired, and they advised us to get at least one more acquisition offer. After a flurry of networking and negotiation, we were able to secure a second acquisition offer. The acquisition was from a larger AI company and at a higher price, but after researching the company’s culture, we knew it would not be a good fit for our team or our open-source product. We shared the news of the second acquisition with Julien, who responded by raising the terms of the offer. The acquisition offer would not make us millionaires overnight, but included generous equity in Hugging Face, some cash for ourselves, and enough cash to return all of our investors’ money in its entirety. As founders, we were ready to accept the acquisition, but it turned out that this wasn’t enough for all of our investors. An Investor Dissents When we presented the acquisition to our investors, we thought all of the investors would be on board. With the acquisition, they were getting enough cash to fully recoup their investment in Gradio. All our investors, including our lead investor, agreed to the acquisition… except for one. Back in 2019, when we raised our seed round for Gradio, we accepted an angel investor whom we had met through a social event. Although we didn’t know him too well, we had many shared acquaintances, and he seemed quite friendly and charismatic. When we told him about the acquisition, we were surprised to see him reject it immediately. He responded saying that he didn’t feel that a 1x return was sufficient after 2 years of investment. “After all, if I had invested in the S&P 500, I would have gotten much better returns” (note: this was back in 2021 when the stock market was doing great). Despite our repeated explanations that the risk/return profiles for venture capital were completely different, and that this was the best outcome we could hope for as a company, this investor refused to budge. This investor had invested only a small amount in Gradio, but the structure of the acquisition (a stock purchase agreement) required every investor to be on board. He was able to effectively block the deal. When I communicated this to Julien, the founders of Hugging Face were all incredibly supportive. Clement Delangue (the CEO) texted me telling me not to worry at all — the acquisition would certainly happen. Over the next few weeks, I exchanged many emails, text messages, and late-night phone calls with the investor (he was traveling in a different part of the world at the time) to try to close the deal. I felt we were so close to our dream acquisition if we could only convince this lone investor. Around this time, I also hit a personal milestone: the birth of my first child. Caring for a newborn while dealing with a recalcitrant investor made this one of the most stressful times in my life. I spent many sleepless nights rocking my newborn in one hand, and on the other hand, texting the investor, thinking of the right things to say. Yet the more I tried to persuade him, the more he buckled down. Thankfully, Hugging Face’s founders and our investors stood by our side. I later learned that Clement got on a call with this investor that lasted several hours, and one of our investors from Pear Ventures, Arash Afrashteh , did the same, on Thanksgiving Day, to close the deal. One of Hugging Face’s board members,

@breeves08

, worked hard to find mutual friends who might be able to persuade our investor. Finally, after weeks that felt like years, the investor agreed to the deal. In the end, he texted me that he was happy with the original deal, he just needed someone to explain the financials to him 🤷‍♂️ Epilogue: After the Acquisition and Lessons Learned We announced the acquisition to the world on Dec. 16, 2021. The response was almost universally positive from friends, family, and Gradio users on social media (with… the predictable exception of Hacker News 😂). Two years since the acquisition, Gradio has grown more than 60x, and is now used to build machine learning apps by 700,000 developers every month. We’ve since released libraries in both Python and JavaScript, including ways to run Gradio demos entirely in the browser. More than 2 million people engage with machine learning using Gradio apps each month (many on Hugging Face Spaces), but we’re honestly just getting started. --------- If I were to summarize the lessons that I learned through our journey of starting a company and being acquired, they would be: 1. Pay attention to the technical problems you face as an engineer, particularly if you face the same problem more than once. The solution can be the seed of a successful startup. 2. Even if you are a first-time founder (in which case you particularly need to hear this), trust your gut more than investors about the direction of your company. You will know more about the pain points in your domain and your team’s willingness to work on problems than your investors. 3. Be very careful who you let invest into your company, particularly if they don’t have a track record of investing in startups. Generally speaking, it's better to have few investors than many. 4. Acquisitions are very hard to plan for. They happen when the strategic interests of a larger company happen to align with something that you can offer. But you can increase your surface area for such opportunities by working in a hot area, building a strong technical product, and communicating (marketing) your product constantly. 5. One acquisition offer, like a term sheet or job offer, breeds more. So don’t stop at a single offer. A second offer will give you perspective, and potentially negotiating power, on the first. 6. If you are getting acquired, make sure that all of your investors are on board before deciding the structure of the acquisition. A stock purchase agreement requires all investors to sign off, but there are other approaches, like mergers, that only require a majority of investors. We considered restructuring our acquisition, but that would have required tens of thousands of dollars in legal fees and at least several weeks’ worth of time. 7. Sometimes the messenger matters more than the message. If you are finding yourself repeating the same message again and again to no effect, consider whether the message might be more persuasive if coming from a different person. 8. When considering acquirers, the future trajectory of the company matters more than its current valuation, particularly if the deal is mostly equity. Even a "small" acquisition in a company that has a lot of upside can turn into a big acquisition equivalent after a few years. 9. If you are getting acquired, find a company whose founders have strong personal reputations. Our confidence in choosing Hugging Face was cemented when we saw how they stuck with us during the bumpy road to acquisition. 10. Don’t pay too much attention to naysayers 😉