Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,12 @@ def img2txt(url):
|
|
21 |
return text
|
22 |
|
23 |
# Text-to-story
|
24 |
-
def txt2story(img_text,
|
25 |
|
26 |
headers = {"Authorization": f"Bearer {os.environ['TOGETHER_API_KEY']}"}
|
27 |
|
28 |
data = {
|
29 |
-
"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.
|
32 |
Ensure stories conclude positively within 100 words. Remember the story must end within 100 words''', "temperature": temperature},
|
|
|
21 |
return text
|
22 |
|
23 |
# Text-to-story
|
24 |
+
def txt2story(img_text, top_k, top_p, temperature):
|
25 |
|
26 |
headers = {"Authorization": f"Bearer {os.environ['TOGETHER_API_KEY']}"}
|
27 |
|
28 |
data = {
|
29 |
+
"model": togethercomputer/llama-2-70b-chat,
|
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.
|
32 |
Ensure stories conclude positively within 100 words. Remember the story must end within 100 words''', "temperature": temperature},
|