Spaces:
Running
Running
Upgrade to Mistral-7B-Instruct-v0.2
Browse files- .gitconfig +0 -0
- .idea/misc.xml +3 -0
- app.py +5 -9
- global_config.py +16 -16
.gitconfig
ADDED
File without changes
|
.idea/misc.xml
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<project version="4">
|
|
|
|
|
|
|
3 |
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (slide-deck-ai)" project-jdk-type="Python SDK" />
|
4 |
</project>
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<project version="4">
|
3 |
+
<component name="Black">
|
4 |
+
<option name="sdkName" value="Python 3.10 (slide-deck-ai)" />
|
5 |
+
</component>
|
6 |
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (slide-deck-ai)" project-jdk-type="Python SDK" />
|
7 |
</project>
|
app.py
CHANGED
@@ -1,15 +1,11 @@
|
|
1 |
-
import base64
|
2 |
-
import os
|
3 |
import pathlib
|
4 |
-
import json5
|
5 |
import logging
|
6 |
-
import
|
7 |
-
import time
|
8 |
-
import streamlit as st
|
9 |
-
import streamlit.runtime.scriptrunner as st_sr
|
10 |
from typing import List, Tuple
|
|
|
|
|
11 |
import metaphor_python as metaphor
|
12 |
-
import
|
13 |
|
14 |
import llm_helper
|
15 |
import pptx_helper
|
@@ -115,7 +111,7 @@ def build_ui():
|
|
115 |
|
116 |
st.title(APP_TEXT['app_name'])
|
117 |
st.subheader(APP_TEXT['caption'])
|
118 |
-
st.markdown('Powered by [Mistral-7B-Instruct-v0.
|
119 |
st.markdown('*If the JSON is generated or parsed incorrectly, try again later by making minor changes '
|
120 |
'to the input text.*')
|
121 |
|
|
|
|
|
|
|
1 |
import pathlib
|
|
|
2 |
import logging
|
3 |
+
import tempfile
|
|
|
|
|
|
|
4 |
from typing import List, Tuple
|
5 |
+
|
6 |
+
import json5
|
7 |
import metaphor_python as metaphor
|
8 |
+
import streamlit as st
|
9 |
|
10 |
import llm_helper
|
11 |
import pptx_helper
|
|
|
111 |
|
112 |
st.title(APP_TEXT['app_name'])
|
113 |
st.subheader(APP_TEXT['caption'])
|
114 |
+
st.markdown('Powered by [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1).')
|
115 |
st.markdown('*If the JSON is generated or parsed incorrectly, try again later by making minor changes '
|
116 |
'to the input text.*')
|
117 |
|
global_config.py
CHANGED
@@ -8,22 +8,22 @@ load_dotenv()
|
|
8 |
|
9 |
@dataclass(frozen=True)
|
10 |
class GlobalConfig:
|
11 |
-
CLARIFAI_PAT = os.environ.get('CLARIFAI_PAT', '')
|
12 |
-
CLARIFAI_USER_ID = 'meta'
|
13 |
-
CLARIFAI_APP_ID = 'Llama-2'
|
14 |
-
CLARIFAI_MODEL_ID = 'llama2-13b-chat'
|
15 |
-
|
16 |
-
CLARIFAI_USER_ID_GPT = 'openai'
|
17 |
-
CLARIFAI_APP_ID_GPT = 'chat-completion'
|
18 |
-
CLARIFAI_MODEL_ID_GPT = 'GPT-4' # 'GPT-3_5-turbo'
|
19 |
-
|
20 |
-
CLARIFAI_USER_ID_SD = 'stability-ai'
|
21 |
-
CLARIFAI_APP_ID_SD = 'stable-diffusion-2'
|
22 |
-
CLARIFAI_MODEL_ID_SD = 'stable-diffusion-xl'
|
23 |
-
CLARIFAI_MODEL_VERSION_ID_SD = '0c919cc1edfc455dbc96207753f178d7'
|
24 |
-
|
25 |
-
HF_LLM_MODEL_NAME = 'mistralai/Mistral-7B-Instruct-v0.
|
26 |
-
LLM_MODEL_TEMPERATURE: float = 0.2
|
27 |
LLM_MODEL_MIN_OUTPUT_LENGTH: int = 50
|
28 |
LLM_MODEL_MAX_OUTPUT_LENGTH: int = 2000
|
29 |
LLM_MODEL_MAX_INPUT_LENGTH: int = 300
|
|
|
8 |
|
9 |
@dataclass(frozen=True)
|
10 |
class GlobalConfig:
|
11 |
+
# CLARIFAI_PAT = os.environ.get('CLARIFAI_PAT', '')
|
12 |
+
# CLARIFAI_USER_ID = 'meta'
|
13 |
+
# CLARIFAI_APP_ID = 'Llama-2'
|
14 |
+
# CLARIFAI_MODEL_ID = 'llama2-13b-chat'
|
15 |
+
#
|
16 |
+
# CLARIFAI_USER_ID_GPT = 'openai'
|
17 |
+
# CLARIFAI_APP_ID_GPT = 'chat-completion'
|
18 |
+
# CLARIFAI_MODEL_ID_GPT = 'GPT-4' # 'GPT-3_5-turbo'
|
19 |
+
#
|
20 |
+
# CLARIFAI_USER_ID_SD = 'stability-ai'
|
21 |
+
# CLARIFAI_APP_ID_SD = 'stable-diffusion-2'
|
22 |
+
# CLARIFAI_MODEL_ID_SD = 'stable-diffusion-xl'
|
23 |
+
# CLARIFAI_MODEL_VERSION_ID_SD = '0c919cc1edfc455dbc96207753f178d7'
|
24 |
+
|
25 |
+
HF_LLM_MODEL_NAME = 'mistralai/Mistral-7B-Instruct-v0.2'
|
26 |
+
LLM_MODEL_TEMPERATURE: float = 0.2
|
27 |
LLM_MODEL_MIN_OUTPUT_LENGTH: int = 50
|
28 |
LLM_MODEL_MAX_OUTPUT_LENGTH: int = 2000
|
29 |
LLM_MODEL_MAX_INPUT_LENGTH: int = 300
|