Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
import gradio as gr
|
4 |
import random
|
|
|
5 |
|
6 |
|
7 |
checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
@@ -14,7 +15,7 @@ def format_prompt(raw_Prompt):
|
|
14 |
|
15 |
|
16 |
def findShops(target_platform, target_region, target_field, target_rangeFrom, target_rangeTo, target_crossSelling, target_similarArticles, target_amount, accessKey):
|
17 |
-
if accessKey != '
|
18 |
return 'You are not authorized to use this software.'
|
19 |
if target_platform == 'All':
|
20 |
basePrompt = f"""
|
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
import gradio as gr
|
4 |
import random
|
5 |
+
import os
|
6 |
|
7 |
|
8 |
checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
|
|
15 |
|
16 |
|
17 |
def findShops(target_platform, target_region, target_field, target_rangeFrom, target_rangeTo, target_crossSelling, target_similarArticles, target_amount, accessKey):
|
18 |
+
if accessKey != os.environ['ACCESS_TOKEN']:
|
19 |
return 'You are not authorized to use this software.'
|
20 |
if target_platform == 'All':
|
21 |
basePrompt = f"""
|