Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,22 +42,12 @@ def respond(
|
|
| 42 |
# Save the input and output to the data list
|
| 43 |
data.append({"input": messages, "output": response})
|
| 44 |
|
| 45 |
-
# Write the data to a JSON file
|
| 46 |
-
with open('./data.json', 'w') as f:
|
| 47 |
-
json.dump(data, f)
|
| 48 |
-
print("Data successfully saved to data.json")
|
| 49 |
-
|
| 50 |
-
# Save the file to Hugging Face space
|
| 51 |
-
repo = Repository("Tech-Meld/HX-Mistral_Alpha", clone_from="https://huggingface.co/spaces/Tech-Meld/HX-Mistral_Alpha") # replace with your space name and url
|
| 52 |
-
repo.push_to_hub("data.json")
|
| 53 |
-
print("File successfully uploaded to Hugging Face space")
|
| 54 |
-
|
| 55 |
|
| 56 |
# Add a title to the UI
|
| 57 |
-
title = "<h1
|
| 58 |
|
| 59 |
# Add a description under the title
|
| 60 |
-
description = "<p
|
| 61 |
|
| 62 |
# Modify the pre-prompt to be editable but greyed out
|
| 63 |
pre_prompt = gr.Textbox(
|
|
@@ -87,4 +77,4 @@ demo = gr.ChatInterface(
|
|
| 87 |
|
| 88 |
|
| 89 |
if __name__ == "__main__":
|
| 90 |
-
demo.launch()
|
|
|
|
| 42 |
# Save the input and output to the data list
|
| 43 |
data.append({"input": messages, "output": response})
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
# Add a title to the UI
|
| 47 |
+
title = "<h1 align='center'>Corenet: Research Preview</h1>"
|
| 48 |
|
| 49 |
# Add a description under the title
|
| 50 |
+
description = "<p align='center'>This is a research project under the codename Corenet, aiming for minimal parameters at given performance level, made by HX labs.</p>"
|
| 51 |
|
| 52 |
# Modify the pre-prompt to be editable but greyed out
|
| 53 |
pre_prompt = gr.Textbox(
|
|
|
|
| 77 |
|
| 78 |
|
| 79 |
if __name__ == "__main__":
|
| 80 |
+
demo.launch()
|