ReallyFloppyPenguin commited on
Commit
5f5d3ff
Β·
verified Β·
1 Parent(s): 9a73686

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +36 -12
  2. requirements.txt +2 -0
README.md CHANGED
@@ -1,12 +1,36 @@
1
- ---
2
- title: SynthGen
3
- emoji: πŸ†
4
- colorFrom: pink
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 5.23.3
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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