Tonic commited on
Commit
4f5e906
·
unverified ·
1 Parent(s): 2b707d9

adds model description, title and join us

Browse files
Files changed (1) hide show
  1. app.py +32 -29
app.py CHANGED
@@ -5,6 +5,27 @@ import os
5
  from transformers import AutoModelForCausalLM, AutoTokenizer
6
  import spaces
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  # Model configuration
9
  MODEL_NAME = "osmosis-ai/Osmosis-Structure-0.6B"
10
 
@@ -171,36 +192,18 @@ def text_to_json(input_text, max_tokens=512, temperature=0.6, top_p=0.95, top_k=
171
  def create_demo():
172
  with gr.Blocks(
173
  title="Osmosis Structure - Text to JSON Converter",
174
- theme=gr.themes.Soft()
175
  ) as demo:
176
-
177
- gr.Markdown("""
178
- # 🌊 Osmosis Structure - Text to JSON Converter
179
-
180
- Convert unstructured text into well-formatted JSON using the Osmosis Structure 0.6B model.
181
- This model is specifically trained for structured data extraction and format conversion.
182
-
183
- > **Note**: This model requires authentication. Ensure your HF_KEY is properly configured in Space secrets.
184
- """)
185
-
186
- gr.Markdown("""
187
- ### ℹ️ About Osmosis Structure
188
-
189
- - **Model**: Osmosis Structure 0.6B parameters
190
- - **Architecture**: Qwen3 (specialized for structured data)
191
- - **Purpose**: Converting unstructured text to structured JSON format
192
- - **Optimizations**: Fine-tuned for data extraction and format conversion tasks
193
- - **Access**: Requires HF authentication token for gated repository
194
-
195
- The model automatically identifies key information in your text and organizes it into logical JSON structures.
196
-
197
- ### 🔐 Authentication Setup
198
-
199
- To use this model, ensure you have:
200
- 1. Set `HF_KEY` in your Space secrets with a valid Hugging Face token
201
- 2. Accepted the model's license agreement on Hugging Face
202
- 3. Ensured your token has access to the gated repository
203
- """)
204
 
205
  with gr.Row():
206
  with gr.Column(scale=1):
 
5
  from transformers import AutoModelForCausalLM, AutoTokenizer
6
  import spaces
7
 
8
+ title = """ # Welcome to Tonic's 🌊 Osmosis Structure - Text to JSON Converter
9
+ """
10
+ description = """
11
+ Convert unstructured text into well-formatted JSON using the Osmosis Structure 0.6B model.
12
+ This model is specifically trained for structured data extraction and format conversion.
13
+
14
+ ### ℹ️ About Osmosis Structure
15
+
16
+ - **Model**: Osmosis Structure 0.6B parameters
17
+ - **Architecture**: Qwen3 (specialized for structured data)
18
+ - **Purpose**: Converting unstructured text to structured JSON format
19
+ - **Optimizations**: Fine-tuned for data extraction and format conversion tasks
20
+ - **Access**: Requires HF authentication token for gated repository
21
+
22
+ The model automatically identifies key information in your text and organizes it into logical JSON structures.
23
+ """
24
+ joinus = """
25
+ ## Join us :
26
+ 🌟TeamTonic🌟 is always making cool demos! Join our active builder's 🛠️community 👻 [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/qdfnvSPcqP) On 🤗Huggingface:[MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to🌟 [MultiTonic](https://github.com/MultiTonic)🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
27
+ """
28
+
29
  # Model configuration
30
  MODEL_NAME = "osmosis-ai/Osmosis-Structure-0.6B"
31
 
 
192
  def create_demo():
193
  with gr.Blocks(
194
  title="Osmosis Structure - Text to JSON Converter",
195
+ theme=gr.themes.Monochrome()
196
  ) as demo:
197
+ with gr.Blocks(theme=gr.themes.Base()) as demo:
198
+ with gr.Row():
199
+ gr.Markdown(title)
200
+ with gr.Row():
201
+ with gr.Column(scale=1):
202
+ with gr.Group():
203
+ gr.Markdown(description)
204
+ with gr.Column(scale=1):
205
+ with gr.Group():
206
+ gr.Markdown(joinus)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
  with gr.Row():
209
  with gr.Column(scale=1):