12 Comments
Apr 23Liked by Victor Dibia

Can you expand on your choice to use Gatsby for your front end? If I was to design my own front-end for Autogen would you recommend I use Gatsby? What might some other good choices be? Particularly if I were to host the front end separately...

Expand full comment
author

Hey Brandon,

The choice of Gatsby is mainly driven by familiarity (I have used it in the past). It is very much comparable to React frameworks like Next.js etc. https://www.gatsbyjs.com/features/jamstack/

The more important choice here is React which enables building really sophisticated, interactive experiences. So any good React based framework will do! https://www.gatsbyjs.com/features/jamstack/

Expand full comment
author

Also, see this follow on article on integrating AutoGen agents into your own web app. https://newsletter.victordibia.com/p/integrating-autogen-agents-into-your

Expand full comment

Wow! Thank you for the helpful reply - keep doing your thing!

Expand full comment
Mar 8Liked by Victor Dibia

Could we host Autogen in Huggingface spaces?

Expand full comment
author

Hi Goerge,

Yes!

The repo has a dockerfile you can use - https://github.com/microsoft/autogen/blob/autogenstudio/samples/apps/autogen-studio/Dockerfile

You will need to modify the dockerfile to fit the exact port that huggingface spaces needs 7680!

See https://huggingface.co/docs/hub/en/spaces-sdks-docker

Yes, you can! I have actually tested this and it works pretty well!

Expand full comment

Followed your instructions and was unable to run on huggingface spaces. How do I add port 7860?

Expand full comment

When I checked the logs it says

Starting gunicorn 22.0.0

Listening at: http://0.0.0.0:8081 (8)

Using worker: uvicorn.workers.UvicornWorker

Expand full comment

At the end of the log

Waiting for application startup

Application startup complete

But when I clicked on App in huggingface spaces there no app?

Expand full comment
author

Hi @george,

You are almost there. The key is to replace 8081 in the dockerfile with 7860.

```

FROM python:3.10

WORKDIR /code

RUN pip install -U gunicorn autogenstudio==0.0.56

RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \

PATH=/home/user/.local/bin:$PATH \

AUTOGENSTUDIO_APPDIR=/home/user/app

WORKDIR $HOME/app

COPY --chown=user . $HOME/app

CMD gunicorn -w $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) --timeout 12600 -k uvicorn.workers.UvicornWorker autogenstudio.web.app:app --bind "0.0.0.0:7860"

```

Expand full comment

Thanks I'd try it out

Expand full comment
Apr 19Liked by Victor Dibia

It works beautifully!!!

Expand full comment