Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,7 @@ model_id = "Detsutut/Igea-350M-v0.0.1"
|
|
8 |
pipeline = transformers.pipeline(
|
9 |
"text-generation",
|
10 |
model=model_id,
|
11 |
-
model_kwargs={"torch_dtype": torch.bfloat16}
|
12 |
-
device_map="auto",
|
13 |
)
|
14 |
|
15 |
# Define the function to generate text
|
@@ -55,8 +54,8 @@ top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.95, step=0.01, label="Top-p"
|
|
55 |
split_output = gr.Checkbox(label="Quick single-sentence output", value=True)
|
56 |
|
57 |
with gr.Blocks() as iface:
|
58 |
-
gr.Markdown("# Igea Text Generation Interface")
|
59 |
-
gr.Markdown("
|
60 |
input_text.render()
|
61 |
with gr.Accordion("Advanced Options", open=False):
|
62 |
max_new_tokens.render()
|
@@ -73,4 +72,4 @@ with gr.Blocks() as iface:
|
|
73 |
|
74 |
# Launch the interface
|
75 |
if __name__ == "__main__":
|
76 |
-
iface.launch()
|
|
|
8 |
pipeline = transformers.pipeline(
|
9 |
"text-generation",
|
10 |
model=model_id,
|
11 |
+
model_kwargs={"torch_dtype": torch.bfloat16}
|
|
|
12 |
)
|
13 |
|
14 |
# Define the function to generate text
|
|
|
54 |
split_output = gr.Checkbox(label="Quick single-sentence output", value=True)
|
55 |
|
56 |
with gr.Blocks() as iface:
|
57 |
+
gr.Markdown("# Igea 350M Text Generation Interface")
|
58 |
+
gr.Markdown("⚠️ 🐢💬 This model runs on a hardware-limited, free-tier HuggingFace space, resulting in a low output token throughput (approx. 1 token/s)")
|
59 |
input_text.render()
|
60 |
with gr.Accordion("Advanced Options", open=False):
|
61 |
max_new_tokens.render()
|
|
|
72 |
|
73 |
# Launch the interface
|
74 |
if __name__ == "__main__":
|
75 |
+
iface.launch()
|