Spaces:
Running
Running
Upload 2 files
Browse files- README.md +36 -12
- requirements.txt +2 -0
README.md
CHANGED
@@ -1,12 +1,36 @@
|
|
1 |
-
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo: green
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Synthetic Text Generator
|
3 |
+
emoji: π
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 4.29.0
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: apache-2.0
|
11 |
+
---
|
12 |
+
|
13 |
+
# Synthetic Text Generator using OpenRouter
|
14 |
+
|
15 |
+
This Space uses models available via [OpenRouter.ai](https://openrouter.ai/) to generate synthetic text based on user prompts.
|
16 |
+
|
17 |
+
## How to Use
|
18 |
+
|
19 |
+
1. **Enter a Prompt:** Describe the kind of text you want to generate in the "Prompt" field.
|
20 |
+
2. **Choose a Model:** Specify the OpenRouter Model ID (you can find available models on the OpenRouter website). Examples: `deepseek/deepseek-chat-v3-0324:free`, `openai/gpt-3.5-turbo`, `google/gemini-flash-1.5`.
|
21 |
+
3. **Set Number of Samples:** Choose how many variations you want.
|
22 |
+
4. **Click Generate:** View the results in the "Generated Samples" box.
|
23 |
+
|
24 |
+
## Setup
|
25 |
+
|
26 |
+
**IMPORTANT:** To use this Space, you need to add your OpenRouter API key as a secret:
|
27 |
+
|
28 |
+
1. Go to your OpenRouter dashboard to get your API key.
|
29 |
+
2. In this Hugging Face Space, go to the **Settings** tab.
|
30 |
+
3. Scroll down to the **Repository secrets** section.
|
31 |
+
4. Click **New secret**.
|
32 |
+
5. Enter `OPENROUTER_API_KEY` as the **Name**.
|
33 |
+
6. Paste your OpenRouter API key into the **Value** field.
|
34 |
+
7. Click **Add secret**.
|
35 |
+
|
36 |
+
The Space should now be able to authenticate with the OpenRouter API.
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
openai>=1.0.0
|
2 |
+
gradio>=4.0.0
|