Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,11 @@ def img2txt(url):
|
|
21 |
return text
|
22 |
|
23 |
# Text-to-story
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
"model": llm_model,
|
26 |
"messages": [
|
27 |
{"role": "system", "content": '''As an experienced short story writer, write story title and then create a meaningful story influenced by provided words.
|
|
|
21 |
return text
|
22 |
|
23 |
# Text-to-story
|
24 |
+
def txt2story(img_text, llm_model, top_k, top_p, temperature):
|
25 |
+
|
26 |
+
headers = {"Authorization": f"Bearer {os.environ['TOGETHER_API_KEY']}"}
|
27 |
+
|
28 |
+
data = {
|
29 |
"model": llm_model,
|
30 |
"messages": [
|
31 |
{"role": "system", "content": '''As an experienced short story writer, write story title and then create a meaningful story influenced by provided words.
|