Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: langfuse on spcaes guide and gradio example #1529

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

jannikmaierhoefer
Copy link

No description provided.

Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot! would actually be nice to contribute to cookbook if you have more integration with HF :)

docs/hub/spaces-sdks-docker-langfuse.md Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
jannikmaierhoefer and others added 2 commits December 17, 2024 08:53
docs/hub/spaces-sdks-docker-langfuse.md Show resolved Hide resolved

You can deploy Langfuse on Hugging Face Spaces effortlessly and start using it within minutes.

### Steps to Deploy Langfuse:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapt to using the the HF default spaces templates instead of the Langfuse template space

@andrewrreed to confirm that the space will be available in the HF spaces menu

CleanShot 2024-12-19 at 12 18 00

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes

  • Pick langfuse from the "select space menu"
  • enable persistent storage
  • configure environment variables / secrets

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the image as soon as Langfuse is available as a Docker template.

docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
- `SALT`: Used to salt hashed API keys, generate secret with at least 256 entropy using `openssl rand -base64 32`. You should overwrite the default value here for a secure deployment.
- `ENCRYPTION_KEY`: Used to encrypt sensitive data. Must be 256 bits, 64 string characters in hex format, generate via: `openssl rand -hex 32`. You should overwrite the default value here for a secure deployment.

![Clone the Langfuse Space](https://langfuse.com/images/cookbook/huggingface/huggingface-space-setup.png)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the image as soon as Langfuse is available docker template.

docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
Copy link

@marcklingen marcklingen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thank you Jannik!

@jannikmaierhoefer jannikmaierhoefer marked this pull request as ready for review December 20, 2024 17:15
@jannikmaierhoefer jannikmaierhoefer changed the title [WIP] docs: langfuse on spcaes guide and gradio example docs: langfuse on spcaes guide and gradio example Dec 20, 2024
Copy link
Member

@andrewrreed andrewrreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this - looks great! Added a few small suggestions.

The gradio space example is awesome 🔥

docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
docs/hub/spaces-sdks-docker-langfuse.md Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 🔥

@@ -0,0 +1,104 @@
# Langfuse on Spaces

This guide shows you how to deploy Langfuse on Hugging Face Spaces and start instrumenting your LLM application. This integration helps you to experiment on Hugging Face models, manage your prompts in one place and evaluate model outputs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to add an image of the space.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think the video below is enough? It could be moved up as it is a great summary of what Langfuse does. Alternatively, I can contribute an mp4 which shows some of the relevant screens (muted). Open for suggestions

2. Select **Docker** as the Space SDK
3. Select **Langfuse** as the Space template
4. Enable **persistent storage** to ensure your Langfuse data is persisted across restarts
5. For a secure deployment, replace the default values of the **environment variables**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. For a secure deployment, replace the default values of the **environment variables**:
5. [Optional but recommended] For a secure deployment, replace the default values of the **environment variables**:

Suggestion to make it a bit less intimidating.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants