Spaces:
Sleeping
Sleeping
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title: STC Demo V2
|
3 |
emoji: 🐢
|
4 |
colorFrom: green
|
5 |
colorTo: pink
|
|
|
1 |
---
|
2 |
+
title: STC Demo V2 DEV
|
3 |
emoji: 🐢
|
4 |
colorFrom: green
|
5 |
colorTo: pink
|
app.py
CHANGED
@@ -50,13 +50,17 @@ class HfModelWrapper:
|
|
50 |
streamer = TextIteratorStreamer(self.tokenizer, skip_prompt=True, skip_special_tokens=True)
|
51 |
|
52 |
gen_kwargs = {
|
53 |
-
"
|
54 |
"streamer": streamer,
|
55 |
-
"
|
56 |
-
"
|
57 |
-
"temperature": 0.
|
58 |
-
"top_p": 0.
|
|
|
59 |
"repetition_penalty": 1.1,
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
thread = Thread(target=self.model.generate, kwargs=gen_kwargs)
|
@@ -76,6 +80,13 @@ class ArtemisiaTheme(Base):
|
|
76 |
neutral_hue=colors.gray,
|
77 |
**kwargs
|
78 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
# Background settings
|
81 |
self.body_background_fill = "#4f008c"
|
@@ -95,6 +106,8 @@ class ArtemisiaTheme(Base):
|
|
95 |
self.text_color = "#ffffff"
|
96 |
self.error_text_color = "#ff5252"
|
97 |
|
|
|
|
|
98 |
# Custom CSS for exact layout and styling
|
99 |
custom_css = """
|
100 |
body {
|
|
|
50 |
streamer = TextIteratorStreamer(self.tokenizer, skip_prompt=True, skip_special_tokens=True)
|
51 |
|
52 |
gen_kwargs = {
|
53 |
+
"input_ids": input_ids,
|
54 |
"streamer": streamer,
|
55 |
+
"max_new_tokens": 2048,
|
56 |
+
"min_length": 10,
|
57 |
+
"temperature": 0.7,
|
58 |
+
"top_p": 0.9,
|
59 |
+
"top_k": 50,
|
60 |
"repetition_penalty": 1.1,
|
61 |
+
"do_sample": True,
|
62 |
+
"eos_token_id": self.tokenizer.eos_token_id,
|
63 |
+
"pad_token_id": self.tokenizer.pad_token_id,
|
64 |
}
|
65 |
|
66 |
thread = Thread(target=self.model.generate, kwargs=gen_kwargs)
|
|
|
80 |
neutral_hue=colors.gray,
|
81 |
**kwargs
|
82 |
)
|
83 |
+
|
84 |
+
<<<<<<< HEAD
|
85 |
+
=======
|
86 |
+
# Set text colors to white
|
87 |
+
self.set(
|
88 |
+
body_text_color="#ffffff",
|
89 |
+
)
|
90 |
|
91 |
# Background settings
|
92 |
self.body_background_fill = "#4f008c"
|
|
|
106 |
self.text_color = "#ffffff"
|
107 |
self.error_text_color = "#ff5252"
|
108 |
|
109 |
+
|
110 |
+
>>>>>>> refs/remotes/origin/main
|
111 |
# Custom CSS for exact layout and styling
|
112 |
custom_css = """
|
113 |
body {
|