Update app.py
Browse files
app.py
CHANGED
@@ -73,6 +73,8 @@ rss_feed = 'https://www.scmp.com/rss/4/feed'
|
|
73 |
apikey = os.environ.get("API_KEY")
|
74 |
client = Groq(api_key=apikey)
|
75 |
|
|
|
|
|
76 |
|
77 |
|
78 |
# RSS feeds
|
@@ -182,6 +184,9 @@ async def main(link, peoples="双人"):
|
|
182 |
{"role": "system", "content": system_prompt},
|
183 |
{"role": "user", "content": prompt},
|
184 |
]
|
|
|
|
|
|
|
185 |
completion = client.chat.completions.create(
|
186 |
model="llama3-8b-8192",
|
187 |
messages=messages,
|
@@ -232,7 +237,7 @@ with gr.Blocks(theme='soft', css=css, title="听说") as iface:
|
|
232 |
with gr.Row():
|
233 |
input_box = gr.Textbox(label="网址", placeholder="请输入https开头的网址")
|
234 |
with gr.Row():
|
235 |
-
peoples = gr.
|
236 |
with gr.Row():
|
237 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
238 |
random_btn = gr.Button("🤙 随机")
|
|
|
73 |
apikey = os.environ.get("API_KEY")
|
74 |
client = Groq(api_key=apikey)
|
75 |
|
76 |
+
MODEL="https://cohereforai-aya-23.hf.space"
|
77 |
+
client = Client(MODEL)
|
78 |
|
79 |
|
80 |
# RSS feeds
|
|
|
184 |
{"role": "system", "content": system_prompt},
|
185 |
{"role": "user", "content": prompt},
|
186 |
]
|
187 |
+
|
188 |
+
print(client.view_api())
|
189 |
+
|
190 |
completion = client.chat.completions.create(
|
191 |
model="llama3-8b-8192",
|
192 |
messages=messages,
|
|
|
237 |
with gr.Row():
|
238 |
input_box = gr.Textbox(label="网址", placeholder="请输入https开头的网址")
|
239 |
with gr.Row():
|
240 |
+
peoples = gr.Radio(["单人","双人"],value="双人",label="播音员人数")
|
241 |
with gr.Row():
|
242 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
243 |
random_btn = gr.Button("🤙 随机")
|